X(1,:,:)=(etoh50);
X(2,:,:)=(S6200);
X(3,:,:)=(S6400);
X(4,:,:)=(S6800);
X(5,:,:)=(S61600);
X(6,:,:)=(S63200);
X(7,:,:)=(S66400);
X(8,:,:)=(S612800);
X(9,:,:)=(S18200);
X(10,:,:)=(S18400);
X(11,:,:)=(S18800);
X(12,:,:)=(S181600);
X(13,:,:)=(S183200);
X(14,:,:)=(S34200);
X(15,:,:)=(S34400);
X(16,:,:)=(S34800);
X(17,:,:)=(S341600);
X(18,:,:)=(S343200);
X(19,:,:)=(S35200);
X(20,:,:)=(S35400);
X(21,:,:)=(S35800);
X(22,:,:)=(S351600);
X(23,:,:)=(S353200);
X(24,:,:)=(N48100);
X(25,:,:)=(N48200);
X(26,:,:)=(N48400);
X(27,:,:)=(N48800);
X(28,:,:)=(N481600);
X(29,:,:)=(N483200);
X(30,:,:)=(N51100);
X(31,:,:)=(N51200);
X(32,:,:)=(N51400);
X(33,:,:)=(N51800);
X(34,:,:)=(N511600);
X(35,:,:)=(N513200);
X(36,:,:)=(N583200);
X(37,:,:)=(N586400);
X(38,:,:)=(N5812800);
X(39,:,:)=(N5825600);
X(40,:,:)=(N5851200);
X(41,:,:)=(N596400);
X(42,:,:)=(N5912800);
X(43,:,:)=(N5925600);
X(44,:,:)=(N5951200);
X(45,:,:)=(P51100);
X(46,:,:)=(P51200);
X(47,:,:)=(P51400);
X(48,:,:)=(P51800);
X(49,:,:)=(P511600);
X(50,:,:)=(P513200);
X(51,:,:)=(P52200);
X(52,:,:)=(P52400);
X(53,:,:)=(P52800);
X(54,:,:)=(P521600);
X(55,:,:)=(P523200);
X(56,:,:)=(P72102400);
X(57,:,:)=(P72204800);
X(58,:,:)=(P72409600);
X(59,:,:)=(P72819200);
X(60,:,:)=(P7651200);
X(61,:,:)=(P76102400);
X(62,:,:)=(P76204800);
X(63,:,:)=(P76409600);
X(64,:,:)=(P76819200);
X(65,:,:)=(PH7212800);
X(66,:,:)=(PH7225600);
X(67,:,:)=(PH7251200);
X(68,:,:)=(PH72102400);
X(69,:,:)=(PH7325600);
X(70,:,:)=(PH7351200);
X(71,:,:)=(PH73102400);
X(72,:,:)=(PH73204800);

312 5230883 william  salgar 
Xin.X = X;
Xin.Em = em;
Xin.Ex = ex;

EEMcor=smootheem(Xin,[10 10],[],[15 15],[],[],[],0.5);%% CONFIGURACION ADECUADA PARA REALIZAR LA SUSTRACCION DE RAMAN Y SCATTERING

subplot(222);mesh(ex,em,(squeeze(EEMcor.Xf(20,:,:))))
subplot(221);mesh(ex,em,(squeeze(Xin.X(20,:,:))))
subplot(223);mesh(ex,em,(squeeze(EEMcor.X(20,:,:))))

NewEEM(1,:,:)=EEMcor.X(2,:,:)-EEMcor.X(1,:,:);
NewEEM(2,:,:)=EEMcor.X(3,:,:)-EEMcor.X(1,:,:);
NewEEM(3,:,:)=EEMcor.X(4,:,:)-EEMcor.X(1,:,:);
NewEEM(4,:,:)=EEMcor.X(5,:,:)-EEMcor.X(1,:,:);
NewEEM(5,:,:)=EEMcor.X(6,:,:)-EEMcor.X(1,:,:);
NewEEM(6,:,:)=EEMcor.X(7,:,:)-EEMcor.X(1,:,:);
NewEEM(7,:,:)=EEMcor.X(8,:,:)-EEMcor.X(1,:,:);
NewEEM(8,:,:)=EEMcor.X(9,:,:)-EEMcor.X(1,:,:);
NewEEM(9,:,:)=EEMcor.X(10,:,:)-EEMcor.X(1,:,:);
NewEEM(10,:,:)=EEMcor.X(11,:,:)-EEMcor.X(1,:,:);
NewEEM(11,:,:)=EEMcor.X(12,:,:)-EEMcor.X(1,:,:);
NewEEM(12,:,:)=EEMcor.X(13,:,:)-EEMcor.X(1,:,:);
NewEEM(13,:,:)=EEMcor.X(14,:,:)-EEMcor.X(1,:,:);
NewEEM(14,:,:)=EEMcor.X(15,:,:)-EEMcor.X(1,:,:);
NewEEM(15,:,:)=EEMcor.X(16,:,:)-EEMcor.X(1,:,:);
NewEEM(16,:,:)=EEMcor.X(17,:,:)-EEMcor.X(1,:,:);
NewEEM(17,:,:)=EEMcor.X(18,:,:)-EEMcor.X(1,:,:);
NewEEM(18,:,:)=EEMcor.X(19,:,:)-EEMcor.X(1,:,:);
NewEEM(19,:,:)=EEMcor.X(20,:,:)-EEMcor.X(1,:,:);
NewEEM(20,:,:)=EEMcor.X(21,:,:)-EEMcor.X(1,:,:);
NewEEM(21,:,:)=EEMcor.X(22,:,:)-EEMcor.X(1,:,:);
NewEEM(22,:,:)=EEMcor.X(23,:,:)-EEMcor.X(1,:,:);
NewEEM(23,:,:)=EEMcor.X(24,:,:)-EEMcor.X(1,:,:);
NewEEM(24,:,:)=EEMcor.X(25,:,:)-EEMcor.X(1,:,:);
NewEEM(25,:,:)=EEMcor.X(26,:,:)-EEMcor.X(1,:,:);
NewEEM(26,:,:)=EEMcor.X(27,:,:)-EEMcor.X(1,:,:);
NewEEM(27,:,:)=EEMcor.X(28,:,:)-EEMcor.X(1,:,:);
NewEEM(28,:,:)=EEMcor.X(29,:,:)-EEMcor.X(1,:,:);
NewEEM(29,:,:)=EEMcor.X(30,:,:)-EEMcor.X(1,:,:);
NewEEM(30,:,:)=EEMcor.X(31,:,:)-EEMcor.X(1,:,:);
NewEEM(31,:,:)=EEMcor.X(32,:,:)-EEMcor.X(1,:,:);
NewEEM(32,:,:)=EEMcor.X(33,:,:)-EEMcor.X(1,:,:);
NewEEM(33,:,:)=EEMcor.X(34,:,:)-EEMcor.X(1,:,:);
NewEEM(34,:,:)=EEMcor.X(35,:,:)-EEMcor.X(1,:,:);
NewEEM(35,:,:)=EEMcor.X(36,:,:)-EEMcor.X(1,:,:);
NewEEM(36,:,:)=EEMcor.X(37,:,:)-EEMcor.X(1,:,:);
NewEEM(37,:,:)=EEMcor.X(38,:,:)-EEMcor.X(1,:,:);
NewEEM(38,:,:)=EEMcor.X(39,:,:)-EEMcor.X(1,:,:);
NewEEM(39,:,:)=EEMcor.X(40,:,:)-EEMcor.X(1,:,:);
NewEEM(40,:,:)=EEMcor.X(41,:,:)-EEMcor.X(1,:,:);
NewEEM(41,:,:)=EEMcor.X(42,:,:)-EEMcor.X(1,:,:);
NewEEM(42,:,:)=EEMcor.X(43,:,:)-EEMcor.X(1,:,:);
NewEEM(43,:,:)=EEMcor.X(44,:,:)-EEMcor.X(1,:,:);
NewEEM(44,:,:)=EEMcor.X(45,:,:)-EEMcor.X(1,:,:);
NewEEM(45,:,:)=EEMcor.X(46,:,:)-EEMcor.X(1,:,:);
NewEEM(46,:,:)=EEMcor.X(47,:,:)-EEMcor.X(1,:,:);
NewEEM(47,:,:)=EEMcor.X(48,:,:)-EEMcor.X(1,:,:);
NewEEM(48,:,:)=EEMcor.X(49,:,:)-EEMcor.X(1,:,:);
NewEEM(49,:,:)=EEMcor.X(50,:,:)-EEMcor.X(1,:,:);
NewEEM(50,:,:)=EEMcor.X(51,:,:)-EEMcor.X(1,:,:);
NewEEM(51,:,:)=EEMcor.X(52,:,:)-EEMcor.X(1,:,:);
NewEEM(52,:,:)=EEMcor.X(53,:,:)-EEMcor.X(1,:,:);
NewEEM(53,:,:)=EEMcor.X(54,:,:)-EEMcor.X(1,:,:);
NewEEM(54,:,:)=EEMcor.X(55,:,:)-EEMcor.X(1,:,:);
NewEEM(55,:,:)=EEMcor.X(56,:,:)-EEMcor.X(1,:,:);
NewEEM(56,:,:)=EEMcor.X(57,:,:)-EEMcor.X(1,:,:);
NewEEM(57,:,:)=EEMcor.X(58,:,:)-EEMcor.X(1,:,:);
NewEEM(58,:,:)=EEMcor.X(59,:,:)-EEMcor.X(1,:,:);
NewEEM(59,:,:)=EEMcor.X(60,:,:)-EEMcor.X(1,:,:);
NewEEM(60,:,:)=EEMcor.X(61,:,:)-EEMcor.X(1,:,:);
NewEEM(61,:,:)=EEMcor.X(62,:,:)-EEMcor.X(1,:,:);
NewEEM(62,:,:)=EEMcor.X(63,:,:)-EEMcor.X(1,:,:);
NewEEM(63,:,:)=EEMcor.X(64,:,:)-EEMcor.X(1,:,:);
NewEEM(64,:,:)=EEMcor.X(65,:,:)-EEMcor.X(1,:,:);
NewEEM(65,:,:)=EEMcor.X(66,:,:)-EEMcor.X(1,:,:);
NewEEM(66,:,:)=EEMcor.X(67,:,:)-EEMcor.X(1,:,:);
NewEEM(67,:,:)=EEMcor.X(68,:,:)-EEMcor.X(1,:,:);
NewEEM(68,:,:)=EEMcor.X(69,:,:)-EEMcor.X(1,:,:);
NewEEM(69,:,:)=EEMcor.X(70,:,:)-EEMcor.X(1,:,:);
NewEEM(70,:,:)=EEMcor.X(71,:,:)-EEMcor.X(1,:,:);
NewEEM(71,:,:)=EEMcor.X(72,:,:)-EEMcor.X(1,:,:);

[ssX,Corco,It] = pftest(70,NewEEM,7,[],[2 2 2])

[ssX,Corco,It] = pftest(22,NewEEM(1:22,:,:),7,[],[2 2 2])%%% 4 solventes
[ssX,Corco,It] = pftest(15,NewEEM(8:22,:,:),8,[],[2 2 2])%%% 3 solventes

[ssX,Corco,It] = pftest(20,NewEEM(23:43,:,:),7,[],[2 2 2])%%%solo naftaleno

[ssX,Corco,It] = pftest(20,NewEEM(44:63,:,:),7,[],[2 2 2])%%%solo pireno

[ssX,Corco,It] = pftest(8,NewEEM(64:71,:,:),7,[],[2 2 2])%%%solo phenathrene

NewEEMA(1,:,:)=EEMcor.X(11,:,:)-EEMcor.X(1,:,:);
NewEEMA(2,:,:)=EEMcor.X(12,:,:)-EEMcor.X(1,:,:);
NewEEMA(3,:,:)=EEMcor.X(13,:,:)-EEMcor.X(1,:,:);
NewEEMA(4,:,:)=EEMcor.X(15,:,:)-EEMcor.X(1,:,:);
NewEEMA(5,:,:)=EEMcor.X(16,:,:)-EEMcor.X(1,:,:);
NewEEMA(6,:,:)=EEMcor.X(17,:,:)-EEMcor.X(1,:,:);
NewEEMA(7,:,:)=EEMcor.X(18,:,:)-EEMcor.X(1,:,:);
NewEEMA(8,:,:)=EEMcor.X(21,:,:)-EEMcor.X(1,:,:);
NewEEMA(9,:,:)=EEMcor.X(22,:,:)-EEMcor.X(1,:,:);
NewEEMA(10,:,:)=EEMcor.X(23,:,:)-EEMcor.X(1,:,:);
NewEEMA(11,:,:)=EEMcor.X(27,:,:)-EEMcor.X(1,:,:);
NewEEMA(12,:,:)=EEMcor.X(28,:,:)-EEMcor.X(1,:,:);
NewEEMA(13,:,:)=EEMcor.X(29,:,:)-EEMcor.X(1,:,:);
NewEEMA(14,:,:)=EEMcor.X(33,:,:)-EEMcor.X(1,:,:);
NewEEMA(15,:,:)=EEMcor.X(34,:,:)-EEMcor.X(1,:,:);
NewEEMA(16,:,:)=EEMcor.X(35,:,:)-EEMcor.X(1,:,:);
NewEEMA(17,:,:)=EEMcor.X(36,:,:)-EEMcor.X(1,:,:);
NewEEMA(18,:,:)=EEMcor.X(37,:,:)-EEMcor.X(1,:,:);
NewEEMA(19,:,:)=EEMcor.X(38,:,:)-EEMcor.X(1,:,:);
NewEEMA(20,:,:)=EEMcor.X(39,:,:)-EEMcor.X(1,:,:);
NewEEMA(21,:,:)=EEMcor.X(40,:,:)-EEMcor.X(1,:,:);
NewEEMA(22,:,:)=EEMcor.X(41,:,:)-EEMcor.X(1,:,:);
NewEEMA(23,:,:)=EEMcor.X(42,:,:)-EEMcor.X(1,:,:);
NewEEMA(24,:,:)=EEMcor.X(43,:,:)-EEMcor.X(1,:,:);
NewEEMA(25,:,:)=EEMcor.X(44,:,:)-EEMcor.X(1,:,:);
NewEEMA(26,:,:)=EEMcor.X(47,:,:)-EEMcor.X(1,:,:);
NewEEMA(27,:,:)=EEMcor.X(48,:,:)-EEMcor.X(1,:,:);
NewEEMA(28,:,:)=EEMcor.X(49,:,:)-EEMcor.X(1,:,:);
NewEEMA(29,:,:)=EEMcor.X(50,:,:)-EEMcor.X(1,:,:);
NewEEMA(30,:,:)=EEMcor.X(52,:,:)-EEMcor.X(1,:,:);
NewEEMA(31,:,:)=EEMcor.X(53,:,:)-EEMcor.X(1,:,:);
NewEEMA(32,:,:)=EEMcor.X(54,:,:)-EEMcor.X(1,:,:);
NewEEMA(33,:,:)=EEMcor.X(55,:,:)-EEMcor.X(1,:,:);
NewEEMA(34,:,:)=EEMcor.X(56,:,:)-EEMcor.X(1,:,:);
NewEEMA(35,:,:)=EEMcor.X(57,:,:)-EEMcor.X(1,:,:);
NewEEMA(36,:,:)=EEMcor.X(58,:,:)-EEMcor.X(1,:,:);
NewEEMA(37,:,:)=EEMcor.X(59,:,:)-EEMcor.X(1,:,:);
NewEEMA(38,:,:)=EEMcor.X(60,:,:)-EEMcor.X(1,:,:);
NewEEMA(39,:,:)=EEMcor.X(61,:,:)-EEMcor.X(1,:,:);
NewEEMA(40,:,:)=EEMcor.X(62,:,:)-EEMcor.X(1,:,:);
NewEEMA(41,:,:)=EEMcor.X(63,:,:)-EEMcor.X(1,:,:);
NewEEMA(42,:,:)=EEMcor.X(64,:,:)-EEMcor.X(1,:,:);
NewEEMA(43,:,:)=EEMcor.X(65,:,:)-EEMcor.X(1,:,:);
NewEEMA(44,:,:)=EEMcor.X(66,:,:)-EEMcor.X(1,:,:);
NewEEMA(45,:,:)=EEMcor.X(67,:,:)-EEMcor.X(1,:,:);
NewEEMA(46,:,:)=EEMcor.X(68,:,:)-EEMcor.X(1,:,:);
NewEEMA(47,:,:)=EEMcor.X(69,:,:)-EEMcor.X(1,:,:);
NewEEMA(48,:,:)=EEMcor.X(70,:,:)-EEMcor.X(1,:,:);
NewEEMA(49,:,:)=EEMcor.X(71,:,:)-EEMcor.X(1,:,:);
NewEEMA(50,:,:)=EEMcor.X(72,:,:)-EEMcor.X(1,:,:);

[ssX,Corco,It] = pftest(50,NewEEMA,9,[],[2 2 2])

NewEEMAR(1,:,:)=NewEEMA(1,1:75,:);
NewEEMAR(2,:,:)=NewEEMA(2,1:75,:);
NewEEMAR(3,:,:)=NewEEMA(3,1:75,:);
NewEEMAR(4,:,:)=NewEEMA(4,1:75,:);
NewEEMAR(5,:,:)=NewEEMA(5,1:75,:);
NewEEMAR(6,:,:)=NewEEMA(6,1:75,:);
NewEEMAR(7,:,:)=NewEEMA(7,1:75,:);
NewEEMAR(8,:,:)=NewEEMA(8,1:75,:);
NewEEMAR(9,:,:)=NewEEMA(9,1:75,:);
NewEEMAR(10,:,:)=NewEEMA(10,1:75,:);
NewEEMAR(11,:,:)=NewEEMA(11,1:75,:);
NewEEMAR(12,:,:)=NewEEMA(12,1:75,:);
NewEEMAR(13,:,:)=NewEEMA(13,1:75,:);
NewEEMAR(14,:,:)=NewEEMA(14,1:75,:);
NewEEMAR(15,:,:)=NewEEMA(15,1:75,:);
NewEEMAR(16,:,:)=NewEEMA(16,1:75,:);
NewEEMAR(17,:,:)=NewEEMA(17,1:75,:);
NewEEMAR(18,:,:)=NewEEMA(18,1:75,:);
NewEEMAR(19,:,:)=NewEEMA(19,1:75,:);
NewEEMAR(20,:,:)=NewEEMA(20,1:75,:);
NewEEMAR(21,:,:)=NewEEMA(21,1:75,:);
NewEEMAR(22,:,:)=NewEEMA(22,1:75,:);
NewEEMAR(23,:,:)=NewEEMA(23,1:75,:);
NewEEMAR(24,:,:)=NewEEMA(24,1:75,:);
NewEEMAR(25,:,:)=NewEEMA(25,1:75,:);
NewEEMAR(26,:,:)=NewEEMA(26,1:75,:);
NewEEMAR(27,:,:)=NewEEMA(27,1:75,:);
NewEEMAR(28,:,:)=NewEEMA(28,1:75,:);
NewEEMAR(29,:,:)=NewEEMA(29,1:75,:);
NewEEMAR(30,:,:)=NewEEMA(30,1:75,:);
NewEEMAR(31,:,:)=NewEEMA(31,1:75,:);
NewEEMAR(32,:,:)=NewEEMA(32,1:75,:);
NewEEMAR(33,:,:)=NewEEMA(33,1:75,:);
NewEEMAR(34,:,:)=NewEEMA(34,1:75,:);
NewEEMAR(35,:,:)=NewEEMA(35,1:75,:);
NewEEMAR(36,:,:)=NewEEMA(36,1:75,:);
NewEEMAR(37,:,:)=NewEEMA(37,1:75,:);
NewEEMAR(38,:,:)=NewEEMA(38,1:75,:);
NewEEMAR(39,:,:)=NewEEMA(39,1:75,:);
NewEEMAR(40,:,:)=NewEEMA(40,1:75,:);
NewEEMAR(41,:,:)=NewEEMA(41,1:75,:);
NewEEMAR(42,:,:)=NewEEMA(42,1:75,:);
NewEEMAR(43,:,:)=NewEEMA(43,1:75,:);
NewEEMAR(44,:,:)=NewEEMA(44,1:75,:);
NewEEMAR(45,:,:)=NewEEMA(45,1:75,:);
NewEEMAR(46,:,:)=NewEEMA(46,1:75,:);
NewEEMAR(47,:,:)=NewEEMA(47,1:75,:);
NewEEMAR(48,:,:)=NewEEMA(48,1:75,:);
NewEEMAR(49,:,:)=NewEEMA(49,1:75,:);
NewEEMAR(50,:,:)=NewEEMA(50,1:75,:);
NewEEMAR(51,:,:)=NewEEMLB(23,:,:);
NewEEMAR(52,:,:)=NewEEMLB(24,:,:);
NewEEMAR(53,:,:)=NewEEMLB(25,:,:);
NewEEMAR(54,:,:)=NewEEMLB(26,:,:);
NewEEMAR(55,:,:)=NewEEMLB(27,:,:);
NewEEMAR(56,:,:)=NewEEMLB(28,:,:);
NewEEMAR(57,:,:)=NewEEMLB(35,:,:);
NewEEMAR(58,:,:)=NewEEMLB(36,:,:);
NewEEMAR(59,:,:)=NewEEMLB(37,:,:);
NewEEMAR(60,:,:)=NewEEMLB(38,:,:);
NewEEMAR(61,:,:)=NewEEMLB(39,:,:);

[ssX,Corco,It] = pftest(61,NewEEMAR,9,[],[2 2 2]);%%% CON RIOS

%%%%%analisis solvente
EEMS(1,:,:)=NewEEMA(1,1:75,:);
EEMS(2,:,:)=NewEEMA(2,1:75,:);
EEMS(3,:,:)=NewEEMA(3,1:75,:);
EEMS(4,:,:)=NewEEMA(4,1:75,:);
EEMS(5,:,:)=NewEEMA(5,1:75,:);
EEMS(6,:,:)=NewEEMA(6,1:75,:);
EEMS(7,:,:)=NewEEMA(7,1:75,:);
EEMS(8,:,:)=NewEEMA(8,1:75,:);
EEMS(9,:,:)=NewEEMA(9,1:75,:);
EEMS(10,:,:)=NewEEMA(10,1:75,:);
EEMS(11,:,:)=NewEEMLB(1,:,:);
EEMS(12,:,:)=NewEEMLB(2,:,:);
EEMS(13,:,:)=NewEEMLB(3,:,:);
EEMS(14,:,:)=NewEEMLB(4,:,:);
EEMS(15,:,:)=NewEEMLB(5,:,:);
EEMS(16,:,:)=NewEEMLB(6,:,:);
EEMS(17,:,:)=NewEEMLB(7,:,:);
EEMS(18,:,:)=NewEEMLB(8,:,:);
EEMS(19,:,:)=NewEEMLB(9,:,:);
EEMS(20,:,:)=NewEEMLB(10,:,:);
EEMS(21,:,:)=NewEEMLB(11,:,:);
EEMS(22,:,:)=NewEEMLB(12,:,:);
EEMS(23,:,:)=NewEEMLB(13,:,:);

[ssX,Corco,It] = pftest(23,EEMS,7,[],[2 2 2]);

%%%%%analisis naftalenos
EEMNAP(1,:,:)=NewEEMA(11,1:51,1:33);
EEMNAP(2,:,:)=NewEEMA(12,1:51,1:33);
EEMNAP(3,:,:)=NewEEMA(13,1:51,1:33);
EEMNAP(4,:,:)=NewEEMA(14,1:51,1:33);
EEMNAP(5,:,:)=NewEEMA(15,1:51,1:33);
EEMNAP(6,:,:)=NewEEMA(16,1:51,1:33);
EEMNAP(7,:,:)=NewEEMA(17,1:51,1:33);
EEMNAP(8,:,:)=NewEEMA(18,1:51,1:33);
EEMNAP(9,:,:)=NewEEMA(19,1:51,1:33);
EEMNAP(10,:,:)=NewEEMA(20,1:51,1:33);
EEMNAP(11,:,:)=NewEEMA(21,1:51,1:33);
EEMNAP(12,:,:)=NewEEMA(22,1:51,1:33);
EEMNAP(13,:,:)=NewEEMA(23,1:51,1:33);
EEMNAP(14,:,:)=NewEEMA(24,1:51,1:33);
EEMNAP(15,:,:)=NewEEMA(25,1:51,1:33);
EEMNAP(16,:,:)=EEMN(1,:,:);
EEMNAP(17,:,:)=EEMN(2,:,:);
EEMNAP(18,:,:)=EEMN(3,:,:);
EEMNAP(19,:,:)=EEMN(4,:,:);
EEMNAP(20,:,:)=EEMN(5,:,:);
EEMNAP(21,:,:)=EEMN(6,:,:);
EEMNAP(22,:,:)=EEMN(7,:,:);
EEMNAP(23,:,:)=EEMN(9,:,:);
EEMNAP(24,:,:)=NewEEMLB(1,1:51,1:33);
EEMNAP(25,:,:)=NewEEMLB(2,1:51,1:33);
EEMNAP(26,:,:)=NewEEMLB(3,1:51,1:33);
EEMNAP(27,:,:)=NewEEMLB(4,1:51,1:33);
EEMNAP(28,:,:)=NewEEMLB(5,1:51,1:33);
EEMNAP(29,:,:)=NewEEMLB(6,1:51,1:33);
EEMNAP(30,:,:)=NewEEMLB(7,1:51,1:33);
EEMNAP(31,:,:)=NewEEMLB(8,1:51,1:33);
EEMNAP(32,:,:)=NewEEMLB(9,1:51,1:33);
EEMNAP(33,:,:)=NewEEMLB(10,1:51,1:33);
EEMNAP(34,:,:)=NewEEMLB(11,1:51,1:33);
EEMNAP(35,:,:)=NewEEMLB(12,1:51,1:33);
EEMNAP(36,:,:)=NewEEMLB(13,1:51,1:33);

[ssX,Corco,It] = pftest(6,EEMNAP(1:6,:,:),7,[],[2 2 2]);

[ssX,Corco,It] = pftest(15,EEMNAP(1:15,:,:),7,[],[2 2 2]);%%% solo bilis

[ssX,Corco,It] = pftest(24,EEMNAP(1:20,:,:),7,[],[2 2 2]);

[ssX,Corco,It] = pftest(24,EEMNAP(1:24,:,:),7,[],[2 2 2]);%%%EXPUESTA A naphtaleno con metabolitos 

[ssX,Corco,It] = pftest(36,EEMNAP,7,[],[2 2 2]);%%%%CON LINEA BASE

%%% naphtaleno con solvente

EEMNAPS(1,:,:)=NewEEMA(11,1:51,1:33);
EEMNAPS(2,:,:)=NewEEMA(12,1:51,1:33);
EEMNAPS(3,:,:)=NewEEMA(13,1:51,1:33);
EEMNAPS(4,:,:)=NewEEMA(14,1:51,1:33);
EEMNAPS(5,:,:)=NewEEMA(15,1:51,1:33);
EEMNAPS(6,:,:)=NewEEMA(16,1:51,1:33);
EEMNAPS(7,:,:)=NewEEMA(17,1:51,1:33);
EEMNAPS(8,:,:)=NewEEMA(18,1:51,1:33);
EEMNAPS(9,:,:)=NewEEMA(19,1:51,1:33);
EEMNAPS(10,:,:)=NewEEMA(20,1:51,1:33);
EEMNAPS(11,:,:)=NewEEMA(21,1:51,1:33);
EEMNAPS(12,:,:)=NewEEMA(22,1:51,1:33);
EEMNAPS(13,:,:)=NewEEMA(23,1:51,1:33);
EEMNAPS(14,:,:)=NewEEMA(24,1:51,1:33);
EEMNAPS(15,:,:)=NewEEMA(25,1:51,1:33);
EEMNAPS(16,:,:)=EEMN(1,:,:);
EEMNAPS(17,:,:)=EEMN(2,:,:);
EEMNAPS(18,:,:)=EEMN(3,:,:);
EEMNAPS(19,:,:)=EEMN(4,:,:);
EEMNAPS(20,:,:)=EEMN(5,:,:);
EEMNAPS(21,:,:)=EEMN(6,:,:);
EEMNAPS(22,:,:)=EEMN(7,:,:);
EEMNAPS(23,:,:)=EEMN(9,:,:);
EEMNAPS(24,:,:)=NewEEMA(1,1:51,1:33);
EEMNAPS(25,:,:)=NewEEMA(2,1:51,1:33);
EEMNAPS(26,:,:)=NewEEMA(3,1:51,1:33);
EEMNAPS(27,:,:)=NewEEMA(4,1:51,1:33);
EEMNAPS(28,:,:)=NewEEMA(5,1:51,1:33);
EEMNAPS(29,:,:)=NewEEMA(6,1:51,1:33);
EEMNAPS(30,:,:)=NewEEMA(7,1:51,1:33);
EEMNAPS(31,:,:)=NewEEMA(8,1:51,1:33);
EEMNAPS(32,:,:)=NewEEMA(9,1:51,1:33);
EEMNAPS(33,:,:)=NewEEMA(10,1:51,1:33);
EEMNAPS(34,:,:)=NewEEMLB(1,1:51,1:33);
EEMNAPS(35,:,:)=NewEEMLB(2,1:51,1:33);
EEMNAPS(36,:,:)=NewEEMLB(3,1:51,1:33);
EEMNAPS(37,:,:)=NewEEMLB(4,1:51,1:33);
EEMNAPS(38,:,:)=NewEEMLB(5,1:51,1:33);
EEMNAPS(39,:,:)=NewEEMLB(6,1:51,1:33);
EEMNAPS(40,:,:)=NewEEMLB(7,1:51,1:33);
EEMNAPS(41,:,:)=NewEEMLB(8,1:51,1:33);
EEMNAPS(42,:,:)=NewEEMLB(9,1:51,1:33);
EEMNAPS(43,:,:)=NewEEMLB(10,1:51,1:33);
EEMNAPS(44,:,:)=NewEEMLB(11,1:51,1:33);
EEMNAPS(45,:,:)=NewEEMLB(12,1:51,1:33);
EEMNAPS(46,:,:)=NewEEMLB(13,1:51,1:33);

[ssX,Corco,It] = pftest(46,EEMNAPS,7,[],[2 2 2]);


%%%%solo 2_OHANP
EEMNAP2(1,:,:)=NewEEMA(11,1:51,1:33);
EEMNAP2(2,:,:)=NewEEMA(12,1:51,1:33);
EEMNAP2(3,:,:)=NewEEMA(13,1:51,1:33);
EEMNAP2(4,:,:)=NewEEMA(14,1:51,1:33);
EEMNAP2(5,:,:)=NewEEMA(15,1:51,1:33);
EEMNAP2(6,:,:)=NewEEMA(16,1:51,1:33);
EEMNAP2(7,:,:)=NewEEMA(17,1:51,1:33);
EEMNAP2(8,:,:)=NewEEMA(18,1:51,1:33);
EEMNAP2(9,:,:)=NewEEMA(19,1:51,1:33);
EEMNAP2(10,:,:)=NewEEMA(20,1:51,1:33);
EEMNAP2(11,:,:)=NewEEMA(21,1:51,1:33);
EEMNAP2(12,:,:)=NewEEMA(22,1:51,1:33);
EEMNAP2(13,:,:)=NewEEMA(23,1:51,1:33);
EEMNAP2(14,:,:)=NewEEMA(24,1:51,1:33);
EEMNAP2(15,:,:)=NewEEMA(25,1:51,1:33);
EEMNAP2(16,:,:)=EEMN(5,:,:);
EEMNAP2(17,:,:)=EEMN(6,:,:);
EEMNAP2(18,:,:)=EEMN(7,:,:);
EEMNAP2(19,:,:)=EEMN(8,:,:);
EEMNAP2(20,:,:)=NewEEMLB(1,1:51,1:33);
EEMNAP2(21,:,:)=NewEEMLB(2,1:51,1:33);
EEMNAP2(22,:,:)=NewEEMLB(3,1:51,1:33);
EEMNAP2(23,:,:)=NewEEMLB(4,1:51,1:33);
EEMNAP2(24,:,:)=NewEEMLB(5,1:51,1:33);
EEMNAP2(25,:,:)=NewEEMLB(6,1:51,1:33);
EEMNAP2(26,:,:)=NewEEMLB(7,1:51,1:33);
EEMNAP2(27,:,:)=NewEEMLB(8,1:51,1:33);
EEMNAP2(28,:,:)=NewEEMLB(9,1:51,1:33);
EEMNAP2(29,:,:)=NewEEMLB(10,1:51,1:33);
EEMNAP2(30,:,:)=NewEEMLB(11,1:51,1:33);
EEMNAP2(31,:,:)=NewEEMLB(12,1:51,1:33);
EEMNAP2(32,:,:)=NewEEMLB(13,1:51,1:33);

[ssX,Corco,It] = pftest(32,EEMNAP2,7,[],[2 2 2]);

%%%%solo 1_OHANP
EEMNAP3(1,:,:)=NewEEMA(11,1:51,1:33);
EEMNAP3(2,:,:)=NewEEMA(12,1:51,1:33);
EEMNAP3(3,:,:)=NewEEMA(13,1:51,1:33);
EEMNAP3(4,:,:)=NewEEMA(14,1:51,1:33);
EEMNAP3(5,:,:)=NewEEMA(15,1:51,1:33);
EEMNAP3(6,:,:)=NewEEMA(16,1:51,1:33);
EEMNAP3(7,:,:)=NewEEMA(17,1:51,1:33);
EEMNAP3(8,:,:)=NewEEMA(18,1:51,1:33);
EEMNAP3(9,:,:)=NewEEMA(19,1:51,1:33);
EEMNAP3(10,:,:)=NewEEMA(20,1:51,1:33);
EEMNAP3(11,:,:)=NewEEMA(21,1:51,1:33);
EEMNAP3(12,:,:)=NewEEMA(22,1:51,1:33);
EEMNAP3(13,:,:)=NewEEMA(23,1:51,1:33);
EEMNAP3(14,:,:)=NewEEMA(24,1:51,1:33);
EEMNAP3(15,:,:)=NewEEMA(25,1:51,1:33);
EEMNAP3(16,:,:)=EEMN(1,:,:);
EEMNAP3(17,:,:)=EEMN(2,:,:);
EEMNAP3(18,:,:)=EEMN(3,:,:);
EEMNAP3(19,:,:)=EEMN(4,:,:);
EEMNAP3(20,:,:)=NewEEMLB(1,1:51,1:33);
EEMNAP3(21,:,:)=NewEEMLB(2,1:51,1:33);
EEMNAP3(22,:,:)=NewEEMLB(3,1:51,1:33);
EEMNAP3(23,:,:)=NewEEMLB(4,1:51,1:33);
EEMNAP3(24,:,:)=NewEEMLB(5,1:51,1:33);
EEMNAP3(25,:,:)=NewEEMLB(6,1:51,1:33);
EEMNAP3(26,:,:)=NewEEMLB(7,1:51,1:33);
EEMNAP3(27,:,:)=NewEEMLB(8,1:51,1:33);
EEMNAP3(28,:,:)=NewEEMLB(9,1:51,1:33);
EEMNAP3(29,:,:)=NewEEMLB(10,1:51,1:33);
EEMNAP3(30,:,:)=NewEEMLB(11,1:51,1:33);
EEMNAP3(31,:,:)=NewEEMLB(12,1:51,1:33);
EEMNAP3(32,:,:)=NewEEMLB(13,1:51,1:33);

[ssX,Corco,It] = pftest(32,EEMNAP3,7,[],[2 2 2]);

EEMNAPT(1,:,:)=NewEEMA(11,1:51,1:33);
EEMNAPT(2,:,:)=NewEEMA(12,1:51,1:33);
EEMNAPT(3,:,:)=NewEEMA(13,1:51,1:33);
EEMNAPT(4,:,:)=NewEEMA(14,1:51,1:33);
EEMNAPT(5,:,:)=NewEEMA(15,1:51,1:33);
EEMNAPT(6,:,:)=NewEEMA(16,1:51,1:33);
EEMNAPT(7,:,:)=NewEEMA(17,1:51,1:33);
EEMNAPT(8,:,:)=NewEEMA(18,1:51,1:33);
EEMNAPT(9,:,:)=NewEEMA(19,1:51,1:33);
EEMNAPT(10,:,:)=NewEEMA(20,1:51,1:33);
EEMNAPT(11,:,:)=NewEEMA(21,1:51,1:33);
EEMNAPT(12,:,:)=NewEEMA(22,1:51,1:33);
EEMNAPT(13,:,:)=NewEEMA(23,1:51,1:33);
EEMNAPT(14,:,:)=NewEEMA(24,1:51,1:33);
EEMNAPT(15,:,:)=NewEEMA(25,1:51,1:33);
EEMNAPT(16,:,:)=EEMN2(1,:,:);
EEMNAPT(17,:,:)=EEMN2(2,:,:);
EEMNAPT(18,:,:)=EEMN2(3,:,:);
EEMNAPT(19,:,:)=EEMN2(4,:,:);
EEMNAPT(20,:,:)=EEMN2(5,:,:);
EEMNAPT(21,:,:)=EEMN2(6,:,:);
EEMNAPT(22,:,:)=EEMN2(7,:,:);
EEMNAPT(23,:,:)=EEMN2(8,:,:);
EEMNAPT(24,:,:)=EEMN2(10,:,:);
EEMNAPT(25,:,:)=NewEEMLB(1,1:51,1:33);
EEMNAPT(26,:,:)=NewEEMLB(2,1:51,1:33);
EEMNAPT(27,:,:)=NewEEMLB(3,1:51,1:33);
EEMNAPT(28,:,:)=NewEEMLB(4,1:51,1:33);
EEMNAPT(29,:,:)=NewEEMLB(5,1:51,1:33);
EEMNAPT(30,:,:)=NewEEMLB(6,1:51,1:33);
EEMNAPT(31,:,:)=NewEEMLB(7,1:51,1:33);
EEMNAPT(32,:,:)=NewEEMLB(8,1:51,1:33);
EEMNAPT(33,:,:)=NewEEMLB(9,1:51,1:33);
EEMNAPT(34,:,:)=NewEEMLB(10,1:51,1:33);
EEMNAPT(35,:,:)=NewEEMLB(11,1:51,1:33);
EEMNAPT(36,:,:)=NewEEMLB(12,1:51,1:33);
EEMNAPT(37,:,:)=NewEEMLB(13,1:51,1:33);

[ssX,Corco,It] = pftest(37,EEMNAPT,7,[],[2 2 2]);

PARANAP=parafac(EEMNAPT,4,[],[2 2 2]);
[Anap,Bnap,Cnap] = fac2let (PARANAP);
subplot(2,2,1); plot(Anap)
xlabel('Sample')
ylabel('Score')
subplot(2,2,2); plot(em(1:51,:),Bnap)
xlabel('Excitation')
ylabel('Fluorescence')
subplot(2,2,3); plot(ex(:,1:33),Cnap)
xlabel('Emision')

ohnap=(((Bnap(:,1)*Cnap(:,1)')).*Anap(7,1))+(((Bnap(:,4)*Cnap(:,4)')).*Anap(7,4));
subplot(2,2,4); mesh (ex(:,1:33),em(1:51,:),ohnap)
xlabel('Excitation')
ylabel('Emision')
zlabel('Fluorescence')

%%%% ANALISIS NAPHTHALENO CON SUSTRACCION DE 5 NM

%%%%solo 2_OHANP
EEMNAPA(1,:,:)=NewEEMA(11,1:50,1:33);
EEMNAPA(2,:,:)=NewEEMA(12,1:50,1:33);
EEMNAPA(3,:,:)=NewEEMA(13,1:50,1:33);
EEMNAPA(4,:,:)=NewEEMA(14,1:50,1:33);
EEMNAPA(5,:,:)=NewEEMA(15,1:50,1:33);
EEMNAPA(6,:,:)=NewEEMA(16,1:50,1:33);
EEMNAPA(7,:,:)=NewEEMA(17,1:50,1:33);
EEMNAPA(8,:,:)=NewEEMA(18,1:50,1:33);
EEMNAPA(9,:,:)=NewEEMA(19,1:50,1:33);
EEMNAPA(10,:,:)=NewEEMA(20,1:50,1:33);
EEMNAPA(11,:,:)=NewEEMA(21,1:50,1:33);
EEMNAPA(12,:,:)=NewEEMA(22,1:50,1:33);
EEMNAPA(13,:,:)=NewEEMA(23,1:50,1:33);
EEMNAPA(14,:,:)=NewEEMA(24,1:50,1:33);
EEMNAPA(15,:,:)=NewEEMA(25,1:50,1:33);
EEMNAPA(16,:,:)=EEMN2(6,2:51,:);
EEMNAPA(17,:,:)=EEMN2(7,2:51,:);
EEMNAPA(18,:,:)=EEMN2(8,2:51,:);
EEMNAPA(19,:,:)=EEMN2(10,2:51,:);
EEMNAPA(20,:,:)=NewEEMLB(1,1:50,1:33);
EEMNAPA(21,:,:)=NewEEMLB(2,1:50,1:33);
EEMNAPA(22,:,:)=NewEEMLB(3,1:50,1:33);
EEMNAPA(23,:,:)=NewEEMLB(4,1:50,1:33);
EEMNAPA(24,:,:)=NewEEMLB(5,1:50,1:33);
EEMNAPA(25,:,:)=NewEEMLB(6,1:50,1:33);
EEMNAPA(26,:,:)=NewEEMLB(7,1:50,1:33);
EEMNAPA(27,:,:)=NewEEMLB(8,1:50,1:33);
EEMNAPA(28,:,:)=NewEEMLB(9,1:50,1:33);
EEMNAPA(29,:,:)=NewEEMLB(10,1:50,1:33);
EEMNAPA(30,:,:)=NewEEMLB(11,1:50,1:33);
EEMNAPA(31,:,:)=NewEEMLB(12,1:50,1:33);
EEMNAPA(32,:,:)=NewEEMLB(13,1:50,1:33);

[ssX,Corco,It] = pftest(32,EEMNAPA,7,[],[2 2 2]);

PARANAPA=parafac(EEMNAPA,3,[],[2 2 2]);
[Anapa,Bnapa,Cnapa] = fac2let (PARANAPA);
subplot(2,2,1); plot(Anapa)
xlabel('Sample')
ylabel('Score')
subplot(2,2,2); plot(em(2:51,:),Bnapa)
xlabel('Excitation')
ylabel('Fluorescence')
subplot(2,2,3); plot(ex(:,1:33),Cnapa)
xlabel('Emision')

ohnapa=(((Bnapa(:,1)*Cnapa(:,1)')).*Anapa(1,1));
subplot(2,2,4); mesh (ex(:,1:33),em(1:50,:),ohnapa)
xlabel('Excitation')
ylabel('Emision')
zlabel('Fluorescence')

ohnapa1=(((Bnapa(:,1)*Cnapa(:,1)')).*Anapa(1,1));
ohnapa2=(((Bnapa(:,1)*Cnapa(:,1)')).*Anapa(2,1));
ohnapa3=(((Bnapa(:,1)*Cnapa(:,1)')).*Anapa(3,1));
ohnapa4=(((Bnapa(:,1)*Cnapa(:,1)')).*Anapa(4,1));
ohnapa5=(((Bnapa(:,1)*Cnapa(:,1)')).*Anapa(5,1));
ohnapa6=(((Bnapa(:,1)*Cnapa(:,1)')).*Anapa(6,1));
ohnapa7=(((Bnapa(:,1)*Cnapa(:,1)')).*Anapa(7,1));
ohnapa8=(((Bnapa(:,1)*Cnapa(:,1)')).*Anapa(8,1));
ohnapa9=(((Bnapa(:,1)*Cnapa(:,1)')).*Anapa(9,1));
ohnapa10=(((Bnapa(:,1)*Cnapa(:,1)')).*Anapa(10,1));
ohnapa11=(((Bnapa(:,1)*Cnapa(:,1)')).*Anapa(11,1));
ohnapa12=(((Bnapa(:,1)*Cnapa(:,1)')).*Anapa(12,1));
ohnapa13=(((Bnapa(:,1)*Cnapa(:,1)')).*Anapa(13,1));
ohnapa14=(((Bnapa(:,1)*Cnapa(:,1)')).*Anapa(14,1));
ohnapa15=(((Bnapa(:,1)*Cnapa(:,1)')).*Anapa(15,1));


%%%%%analisis PIRENO
EEMPYR(1,:,:)=NewEEMA(26,1:75,:);
EEMPYR(2,:,:)=NewEEMA(27,1:75,:);
EEMPYR(3,:,:)=NewEEMA(28,1:75,:);
EEMPYR(4,:,:)=NewEEMA(29,1:75,:);
EEMPYR(5,:,:)=NewEEMA(30,1:75,:);
EEMPYR(6,:,:)=NewEEMA(31,1:75,:);
EEMPYR(7,:,:)=NewEEMA(32,1:75,:);
EEMPYR(8,:,:)=NewEEMA(33,1:75,:);
EEMPYR(9,:,:)=NewEEMA(34,1:75,:);
EEMPYR(10,:,:)=NewEEMA(35,1:75,:);
EEMPYR(11,:,:)=NewEEMA(36,1:75,:);
EEMPYR(12,:,:)=NewEEMA(37,1:75,:);
EEMPYR(13,:,:)=NewEEMA(38,1:75,:);
EEMPYR(14,:,:)=NewEEMA(39,1:75,:);
EEMPYR(15,:,:)=NewEEMA(40,1:75,:);
EEMPYR(16,:,:)=NewEEMA(41,1:75,:);
EEMPYR(17,:,:)=NewEEMA(42,1:75,:);
EEMPYR(18,:,:)=EEMP(1,:,:);
EEMPYR(19,:,:)=EEMP(2,:,:);
EEMPYR(20,:,:)=EEMP(3,:,:);
EEMPYR(21,:,:)=EEMP(4,:,:);
EEMPYR(22,:,:)=NewEEMLB(1,:,:);
EEMPYR(23,:,:)=NewEEMLB(2,:,:);
EEMPYR(24,:,:)=NewEEMLB(3,:,:);
EEMPYR(25,:,:)=NewEEMLB(4,:,:);
EEMPYR(26,:,:)=NewEEMLB(5,:,:);
EEMPYR(27,:,:)=NewEEMLB(6,:,:);
EEMPYR(28,:,:)=NewEEMLB(7,:,:);
EEMPYR(29,:,:)=NewEEMLB(8,:,:);
EEMPYR(30,:,:)=NewEEMLB(9,:,:);
EEMPYR(31,:,:)=NewEEMLB(10,:,:);
EEMPYR(32,:,:)=NewEEMLB(11,:,:);
EEMPYR(33,:,:)=NewEEMLB(12,:,:);
EEMPYR(34,:,:)=NewEEMLB(13,:,:);

[ssX,Corco,It] = pftest(21,EEMPYR(1:21,:,:),7,[],[2 2 2]);%%%EXPUESTA A PYRENE con metabolitos 

[ssX,Corco,It] = pftest(34,EEMPYR,7,[],[2 2 2]);%%%%CON LINEA BASE

PARAPYR=parafac(EEMPYR,3,[],[2 2 2]);
[Apyr,Bpyr,Cpyr] = fac2let (PARAPYR);
subplot(2,2,1); plot(Apyr)
xlabel('Sample')
ylabel('Score')
subplot(2,2,2); plot(em(1:75,:),Bpyr)
xlabel('Excitation')
ylabel('Fluorescence')
subplot(2,2,3); plot(ex,Cpyr)
xlabel('Emision')
ylabel('Fluorescence')

ohpyr=(((Bpyr(:,1)*Cpyr(:,1)')).*Apyr(9,1));
+(((Bnap(:,4)*Cnap(:,4)')).*Anap(7,4));
subplot(2,2,4); mesh (ex,em(1:75,:),ohpyr)
xlabel('Excitation')
ylabel('Emision')
zlabel('Fluorescence')


%%%%%analisis PIRENO CONREDUCCION DE 5NM
EEMPYRA(1,:,:)=NewEEMA(26,1:74,:);
EEMPYRA(2,:,:)=NewEEMA(27,1:74,:);
EEMPYRA(3,:,:)=NewEEMA(28,1:74,:);
EEMPYRA(4,:,:)=NewEEMA(29,1:74,:);
EEMPYRA(5,:,:)=NewEEMA(30,1:74,:);
EEMPYRA(6,:,:)=NewEEMA(31,1:74,:);
EEMPYRA(7,:,:)=NewEEMA(32,1:74,:);
EEMPYRA(8,:,:)=NewEEMA(33,1:74,:);
EEMPYRA(9,:,:)=NewEEMA(34,1:74,:);
EEMPYRA(10,:,:)=NewEEMA(35,1:74,:);
EEMPYRA(11,:,:)=NewEEMA(36,1:74,:);
EEMPYRA(12,:,:)=NewEEMA(37,1:74,:);
EEMPYRA(13,:,:)=NewEEMA(38,1:74,:);
EEMPYRA(14,:,:)=NewEEMA(39,1:74,:);
EEMPYRA(15,:,:)=NewEEMA(40,1:74,:);
EEMPYRA(16,:,:)=NewEEMA(41,1:74,:);
EEMPYRA(17,:,:)=NewEEMA(42,1:74,:);
EEMPYRA(18,:,:)=EEMP(1,2:75,:);
EEMPYRA(19,:,:)=EEMP(2,2:75,:);
EEMPYRA(20,:,:)=EEMP(3,2:75,:);
EEMPYRA(21,:,:)=EEMP(4,2:75,:);
EEMPYRA(22,:,:)=NewEEMLB(1,1:74,:);
EEMPYRA(23,:,:)=NewEEMLB(2,1:74,:);
EEMPYRA(24,:,:)=NewEEMLB(3,1:74,:);
EEMPYRA(25,:,:)=NewEEMLB(4,1:74,:);
EEMPYRA(26,:,:)=NewEEMLB(5,1:74,:);
EEMPYRA(27,:,:)=NewEEMLB(6,1:74,:);
EEMPYRA(28,:,:)=NewEEMLB(7,1:74,:);
EEMPYRA(29,:,:)=NewEEMLB(8,1:74,:);
EEMPYRA(30,:,:)=NewEEMLB(9,1:74,:);
EEMPYRA(31,:,:)=NewEEMLB(10,1:74,:);
EEMPYRA(32,:,:)=NewEEMLB(11,1:74,:);
EEMPYRA(33,:,:)=NewEEMLB(12,1:74,:);
EEMPYRA(34,:,:)=NewEEMLB(13,1:74,:);

[ssX,Corco,It] = pftest(34,EEMPYRA,7,[],[2 2 2]);%%%%CON LINEA BASE

PARAPYRA=parafac(EEMPYRA,3,[],[2 2 2]);
[Apyra,Bpyra,Cpyra] = fac2let (PARAPYRA);
subplot(2,2,1); plot(Apyra)
xlabel('Sample')
ylabel('Score')
subplot(2,2,2); plot(em(1:74,:),Bpyra)
xlabel('Emision(nm)')
ylabel('Fluorescence')
subplot(2,2,3); plot(ex,Cpyra)
xlabel('Excitation(nm)')
ylabel('Fluorescence')

ohpyra=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(9,1));

subplot(2,2,4); mesh (ex,em(1:74,:),ohpyra)
xlabel('Excitation')
ylabel('Emision')
zlabel('Fluorescence')

ohpyra1=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(1,1));
ohpyra2=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(2,1));
ohpyra3=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(3,1));
ohpyra4=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(4,1));
ohpyra5=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(5,1));
ohpyra6=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(6,1));
ohpyra7=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(7,1));
ohpyra8=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(8,1));
ohpyra9=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(9,1));
ohpyra10=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(10,1));
ohpyra11=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(11,1));
ohpyra12=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(12,1));
ohpyra13=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(13,1));
ohpyra14=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(14,1));
ohpyra15=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(15,1));
ohpyra16=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(16,1));
ohpyra17=(((Bpyra(:,1)*Cpyra(:,1)')).*Apyra(17,1));



%%%%% pireno con solvente

EEMPYRS(1,:,:)=NewEEMA(26,1:75,:);
EEMPYRS(2,:,:)=NewEEMA(27,1:75,:);
EEMPYRS(3,:,:)=NewEEMA(28,1:75,:);
EEMPYRS(4,:,:)=NewEEMA(29,1:75,:);
EEMPYRS(5,:,:)=NewEEMA(30,1:75,:);
EEMPYRS(6,:,:)=NewEEMA(31,1:75,:);
EEMPYRS(7,:,:)=NewEEMA(32,1:75,:);
EEMPYRS(8,:,:)=NewEEMA(33,1:75,:);
EEMPYRS(9,:,:)=NewEEMA(34,1:75,:);
EEMPYRS(10,:,:)=NewEEMA(35,1:75,:);
EEMPYRS(11,:,:)=NewEEMA(36,1:75,:);
EEMPYRS(12,:,:)=NewEEMA(37,1:75,:);
EEMPYRS(13,:,:)=NewEEMA(38,1:75,:);
EEMPYRS(14,:,:)=NewEEMA(39,1:75,:);
EEMPYRS(15,:,:)=NewEEMA(40,1:75,:);
EEMPYRS(16,:,:)=NewEEMA(41,1:75,:);
EEMPYRS(17,:,:)=NewEEMA(42,1:75,:);
EEMPYRS(18,:,:)=EEMP(1,:,:);
EEMPYRS(19,:,:)=EEMP(2,:,:);
EEMPYRS(20,:,:)=EEMP(3,:,:);
EEMPYRS(21,:,:)=EEMP(4,:,:);
EEMPYRS(22,:,:)=NewEEMA(1,1:75,:);
EEMPYRS(23,:,:)=NewEEMA(2,1:75,:);
EEMPYRS(24,:,:)=NewEEMA(3,1:75,:);
EEMPYRS(25,:,:)=NewEEMA(4,1:75,:);
EEMPYRS(26,:,:)=NewEEMA(5,1:75,:);
EEMPYRS(27,:,:)=NewEEMA(6,1:75,:);
EEMPYRS(28,:,:)=NewEEMA(7,1:75,:);
EEMPYRS(29,:,:)=NewEEMA(8,1:75,:);
EEMPYRS(30,:,:)=NewEEMA(9,1:75,:);
EEMPYRS(31,:,:)=NewEEMA(10,1:75,:);
EEMPYRS(32,:,:)=NewEEMLB(1,:,:);
EEMPYRS(33,:,:)=NewEEMLB(2,:,:);
EEMPYRS(34,:,:)=NewEEMLB(3,:,:);
EEMPYRS(35,:,:)=NewEEMLB(4,:,:);
EEMPYRS(36,:,:)=NewEEMLB(5,:,:);
EEMPYRS(37,:,:)=NewEEMLB(6,:,:);
EEMPYRS(38,:,:)=NewEEMLB(7,:,:);
EEMPYRS(39,:,:)=NewEEMLB(8,:,:);
EEMPYRS(40,:,:)=NewEEMLB(9,:,:);
EEMPYRS(41,:,:)=NewEEMLB(10,:,:);
EEMPYRS(42,:,:)=NewEEMLB(11,:,:);
EEMPYRS(43,:,:)=NewEEMLB(12,:,:);
EEMPYRS(44,:,:)=NewEEMLB(13,:,:);

[ssX,Corco,It] = pftest(44,EEMPYRS,7,[],[2 2 2]);

%%%%IDEA INCLUYENDO NAPHTALANE
EEMPYR1(1,:,:)=NewEEMA(26,1:51,1:33);
EEMPYR1(2,:,:)=NewEEMA(27,1:51,1:33);
EEMPYR1(3,:,:)=NewEEMA(28,1:51,1:33);
EEMPYR1(4,:,:)=NewEEMA(29,1:51,1:33);
EEMPYR1(5,:,:)=NewEEMA(30,1:51,1:33);
EEMPYR1(6,:,:)=NewEEMA(31,1:51,1:33);
EEMPYR1(7,:,:)=NewEEMA(32,1:51,1:33);
EEMPYR1(8,:,:)=NewEEMA(33,1:51,1:33);
EEMPYR1(9,:,:)=NewEEMA(34,1:51,1:33);
EEMPYR1(10,:,:)=NewEEMA(35,1:51,1:33);
EEMPYR1(11,:,:)=NewEEMA(36,1:51,1:33);
EEMPYR1(12,:,:)=NewEEMA(37,1:51,1:33);
EEMPYR1(13,:,:)=NewEEMA(38,1:51,1:33);
EEMPYR1(14,:,:)=NewEEMA(39,1:51,1:33);
EEMPYR1(15,:,:)=NewEEMA(40,1:51,1:33);
EEMPYR1(16,:,:)=NewEEMA(41,1:51,1:33);
EEMPYR1(17,:,:)=NewEEMA(42,1:51,1:33);
EEMPYR1(18,:,:)=EEMP(1,1:51,1:33);
EEMPYR1(19,:,:)=EEMP(2,1:51,1:33);
EEMPYR1(20,:,:)=EEMP(3,1:51,1:33);
EEMPYR1(21,:,:)=EEMP(4,1:51,1:33);
EEMPYR1(22,:,:)=NewEEMLB(1,1:51,1:33);
EEMPYR1(23,:,:)=NewEEMLB(2,1:51,1:33);
EEMPYR1(24,:,:)=NewEEMLB(3,1:51,1:33);
EEMPYR1(25,:,:)=NewEEMLB(4,1:51,1:33);
EEMPYR1(26,:,:)=NewEEMLB(5,1:51,1:33);
EEMPYR1(27,:,:)=NewEEMLB(6,1:51,1:33);
EEMPYR1(28,:,:)=NewEEMLB(7,1:51,1:33);
EEMPYR1(29,:,:)=NewEEMLB(8,1:51,1:33);
EEMPYR1(30,:,:)=NewEEMLB(9,1:51,1:33);
EEMPYR1(31,:,:)=NewEEMLB(10,1:51,1:33);
EEMPYR1(32,:,:)=NewEEMLB(11,1:51,1:33);
EEMPYR1(33,:,:)=NewEEMLB(12,1:51,1:33);
EEMPYR1(34,:,:)=NewEEMLB(13,1:51,1:33);
EEMPYR1(35,:,:)=EEMN(1,:,:);
EEMPYR1(36,:,:)=EEMN(2,:,:);
EEMPYR1(37,:,:)=EEMN(3,:,:);
EEMPYR1(38,:,:)=EEMN(4,:,:);
EEMPYR1(39,:,:)=EEMN(5,:,:);
EEMPYR1(40,:,:)=EEMN(6,:,:);
EEMPYR1(41,:,:)=EEMN(7,:,:);
EEMPYR1(42,:,:)=EEMN(8,:,:);
EEMPYR1(43,:,:)=EEMN(9,:,:);

[ssX,Corco,It] = pftest(43,EEMPYR1,7,[],[2 2 2]); PYRENO CON NAPHTALNE

%%%%%analisis PHENANTHRENE
EEMPHE(1,:,:)=NewEEMA(43,1:61,:);
EEMPHE(2,:,:)=NewEEMA(44,1:61,:);
EEMPHE(3,:,:)=NewEEMA(45,1:61,:);
EEMPHE(4,:,:)=NewEEMA(46,1:61,:);
EEMPHE(5,:,:)=NewEEMA(47,1:61,:);
EEMPHE(6,:,:)=NewEEMA(48,1:61,:);
EEMPHE(7,:,:)=NewEEMA(49,1:61,:);
EEMPHE(8,:,:)=NewEEMA(50,1:61,:);
EEMPHE(9,:,:)=EEMPH(1,:,:);
EEMPHE(10,:,:)=EEMPH(2,:,:);
EEMPHE(11,:,:)=EEMPH(3,:,:);
EEMPHE(12,:,:)=EEMPH(4,:,:);
EEMPHE(13,:,:)=NewEEMLB(1,1:61,:);
EEMPHE(14,:,:)=NewEEMLB(2,1:61,:);
EEMPHE(15,:,:)=NewEEMLB(3,1:61,:);
EEMPHE(16,:,:)=NewEEMLB(4,1:61,:);
EEMPHE(17,:,:)=NewEEMLB(5,1:61,:);
EEMPHE(18,:,:)=NewEEMLB(6,1:61,:);
EEMPHE(19,:,:)=NewEEMLB(7,1:61,:);
EEMPHE(20,:,:)=NewEEMLB(8,1:61,:);
EEMPHE(21,:,:)=NewEEMLB(9,1:61,:);
EEMPHE(22,:,:)=NewEEMLB(10,1:61,:);
EEMPHE(23,:,:)=NewEEMLB(11,1:61,:);
EEMPHE(24,:,:)=NewEEMLB(12,1:61,:);
EEMPHE(25,:,:)=NewEEMLB(13,1:61,:);

[ssX,Corco,It] = pftest(12,EEMPHE(1:12,:,:),7,[],[2 2 2]);%%%EXPUESTA A PHENANTHRENE con metabolitos 

[ssX,Corco,It] = pftest(25,EEMPHE,7,[],[2 2 2]);%%%%CON LINEA BASE

PARAPHE=parafac(EEMPHE,3,[],[2 2 2]);
[Aphe,Bphe,Cphe] = fac2let (PARAPHE);
subplot(2,2,1); plot(Aphe)
xlabel('Sample')
ylabel('Score')
subplot(2,2,2); plot(em(1:61,:),Bphe)
xlabel('Excitation')
ylabel('Fluorescence')
subplot(2,2,3); plot(ex,Cphe)
xlabel('Emision')
ylabel('Fluorescence')

ohphe=(((Bnap(:,1)*Cnap(:,1)')).*Anap(7,1))+(((Bnap(:,4)*Cnap(:,4)')).*Anap(7,4));
subplot(2,2,4); mesh (ex(:,1:33),em(1:51,:),ohnap)
xlabel('Excitation')
ylabel('Emision')
zlabel('Fluorescence')

%%% ANALISIS RIO
EEMRIO(1,:,:)=NewEEMLB(23,1:51,1:33);
EEMRIO(2,:,:)=NewEEMLB(24,1:51,1:33);
EEMRIO(3,:,:)=NewEEMLB(25,1:51,1:33);
EEMRIO(4,:,:)=NewEEMLB(26,1:51,1:33);
EEMRIO(5,:,:)=NewEEMLB(27,1:51,1:33);
EEMRIO(6,:,:)=NewEEMLB(28,1:51,1:33);
EEMRIO(7,:,:)=NewEEMLB(35,1:51,1:33);
EEMRIO(8,:,:)=NewEEMLB(36,1:51,1:33);
EEMRIO(9,:,:)=NewEEMLB(37,1:51,1:33);
EEMRIO(10,:,:)=NewEEMLB(38,1:51,1:33);
EEMRIO(11,:,:)=NewEEMLB(39,1:51,1:33);
EEMRIO(12,:,:)=EEMP(1,1:51,1:33);
EEMRIO(13,:,:)=EEMP(2,1:51,1:33);
EEMRIO(14,:,:)=EEMP(3,1:51,1:33);
EEMRIO(15,:,:)=EEMP(4,1:51,1:33);
EEMRIO(16,:,:)=EEMPH(1,1:51,1:33);
EEMRIO(17,:,:)=EEMPH(2,1:51,1:33);
EEMRIO(18,:,:)=EEMPH(3,1:51,1:33);
EEMRIO(19,:,:)=EEMPH(4,1:51,1:33);
EEMRIO(20,:,:)=EEMN2(1,1:51,1:33);
EEMRIO(21,:,:)=EEMN2(2,1:51,1:33);
EEMRIO(22,:,:)=EEMN2(3,1:51,1:33);
EEMRIO(23,:,:)=EEMN2(4,1:51,1:33);
EEMRIO(24,:,:)=EEMN2(5,1:51,1:33);
EEMRIO(25,:,:)=EEMN2(6,1:51,1:33);
EEMRIO(26,:,:)=EEMN2(7,1:51,1:33);
EEMRIO(27,:,:)=EEMN2(8,1:51,1:33);
EEMRIO(28,:,:)=EEMN2(10,1:51,1:33);
EEMRIO(29,:,:)=NewEEMLB(1,1:51,1:33);
EEMRIO(30,:,:)=NewEEMLB(2,1:51,1:33);
EEMRIO(31,:,:)=NewEEMLB(3,1:51,1:33);
EEMRIO(32,:,:)=NewEEMLB(4,1:51,1:33);
EEMRIO(33,:,:)=NewEEMLB(5,1:51,1:33);
EEMRIO(34,:,:)=NewEEMLB(6,1:51,1:33);
EEMRIO(35,:,:)=NewEEMLB(7,1:51,1:33);
EEMRIO(36,:,:)=NewEEMLB(8,1:51,1:33);
EEMRIO(37,:,:)=NewEEMLB(9,1:51,1:33);
EEMRIO(38,:,:)=NewEEMLB(10,1:51,1:33);
EEMRIO(39,:,:)=NewEEMLB(11,1:51,1:33);
EEMRIO(40,:,:)=NewEEMLB(12,1:51,1:33);
EEMRIO(41,:,:)=NewEEMLB(13,1:51,1:33);

[ssX,Corco,It] = pftest(11,EEMRIO(1:11,:,:),7,[],[2 2 2]);

[ssX,Corco,It] = pftest(28,EEMRIO(1:28,:,:),7,[],[2 2 2]);%%%EXPUESTA A RIOS con metabolitos 

[ssX,Corco,It] = pftest(41,EEMRIO,7,[],[2 2 2]);%%%%CON LINEA BASE

PARARIO=parafac(EEMRIO(1:11,:,:),2,[],[2 2 2]);
[Aphr,Bphr,Cphr] = fac2let (PARARIO);

recver1=(((Bphr(:,1)*Cphr(:,1)')).*Aphr(1,1))+(((Bphr(:,2)*Cphr(:,2)')).*Aphr(1,2));
recver2=(((Bphr(:,1)*Cphr(:,1)')).*Aphr(2,1))+(((Bphr(:,2)*Cphr(:,2)')).*Aphr(2,2));
recver3=(((Bphr(:,1)*Cphr(:,1)')).*Aphr(3,1))+(((Bphr(:,2)*Cphr(:,2)')).*Aphr(3,2));
recver4=(((Bphr(:,1)*Cphr(:,1)')).*Aphr(4,1))+(((Bphr(:,2)*Cphr(:,2)')).*Aphr(4,2));
recver5=(((Bphr(:,1)*Cphr(:,1)')).*Aphr(5,1))+(((Bphr(:,2)*Cphr(:,2)')).*Aphr(5,2));
recver6=(((Bphr(:,1)*Cphr(:,1)')).*Aphr(6,1))+(((Bphr(:,2)*Cphr(:,2)')).*Aphr(6,2));
recref7=(((Bphr(:,1)*Cphr(:,1)')).*Aphr(7,1))+(((Bphr(:,2)*Cphr(:,2)')).*Aphr(7,2));
recref8=(((Bphr(:,1)*Cphr(:,1)')).*Aphr(8,1))+(((Bphr(:,2)*Cphr(:,2)')).*Aphr(8,2));
recref9=(((Bphr(:,1)*Cphr(:,1)')).*Aphr(9,1))+(((Bphr(:,2)*Cphr(:,2)')).*Aphr(9,2));
recref10=(((Bphr(:,1)*Cphr(:,1)')).*Aphr(10,1))+(((Bphr(:,2)*Cphr(:,2)')).*Aphr(10,2));
recref11=(((Bphr(:,1)*Cphr(:,1)')).*Aphr(11,1))+(((Bphr(:,2)*Cphr(:,2)')).*Aphr(11,2));

resver1=(squeeze(EEMRIO(1,:,:)))-recver1;
resver2=(squeeze(EEMRIO(2,:,:)))-recver2;
resver3=(squeeze(EEMRIO(3,:,:)))-recver3;
resver4=(squeeze(EEMRIO(4,:,:)))-recver4;
resver5=(squeeze(EEMRIO(5,:,:)))-recver5;
resver6=(squeeze(EEMRIO(6,:,:)))-recver6;
resref7=(squeeze(EEMRIO(7,:,:)))-recref7;
resref8=(squeeze(EEMRIO(8,:,:)))-recref8;
resref9=(squeeze(EEMRIO(9,:,:)))-recref9;
resref10=(squeeze(EEMRIO(10,:,:)))-recref10;
resref11=(squeeze(EEMRIO(11,:,:)))-recref11;

EEMRES(1,:,:)=resver1;
EEMRES(2,:,:)=resver2;
EEMRES(3,:,:)=resver3;
EEMRES(4,:,:)=resver4;
EEMRES(5,:,:)=resver5;
EEMRES(6,:,:)=resver6;
EEMRES(7,:,:)=resref7;
EEMRES(8,:,:)=resref8;
EEMRES(9,:,:)=resref9;
EEMRES(10,:,:)=resref10;
EEMRES(11,:,:)=resref11;
EEMRES(12,:,:)=EEMP(2,1:51,1:33);
EEMRES(13,:,:)=EEMP(3,1:51,1:33);
EEMRES(14,:,:)=EEMP(4,1:51,1:33);
EEMRES(15,:,:)=EEMN2(7,1:51,1:33);
EEMRES(16,:,:)=EEMN2(8,1:51,1:33);
EEMRES(17,:,:)=EEMN2(10,1:51,1:33);
EEMRES(18,:,:)=EEMPH(2,1:51,1:33);
EEMRES(19,:,:)=EEMPH(3,1:51,1:33);
EEMRES(20,:,:)=EEMPH(4,1:51,1:33);

[ssX,Corco,It] = pftest(20,EEMRES,7,[],[2 2 2]);

[ssX,Corco,It] = pftest(11,EEMRES(1:11,:,:),7,[],[2 2 2]);

EEMRES1(1,:,:)=resver1;
EEMRES1(2,:,:)=resver2;
EEMRES1(3,:,:)=resver3;
EEMRES1(4,:,:)=resver4;
EEMRES1(5,:,:)=resver5;
EEMRES1(6,:,:)=resver6;
EEMRES1(7,:,:)=resref7;
EEMRES1(8,:,:)=resref8;
EEMRES1(9,:,:)=resref9;
EEMRES1(10,:,:)=resref10;
EEMRES1(11,:,:)=resref11;
EEMRES1(12,:,:)=EEMN2(7,1:51,1:33);
EEMRES1(13,:,:)=EEMN2(8,1:51,1:33);
EEMRES1(14,:,:)=EEMN2(10,1:51,1:33);
EEMRES1(15,:,:)=EEMPH(2,1:51,1:33);
EEMRES1(16,:,:)=EEMPH(3,1:51,1:33);
EEMRES1(17,:,:)=EEMPH(4,1:51,1:33);

[ssX,Corco,It] = pftest(17,EEMRES1,7,[],[2 2 2]);

EEMRES2(1,:,:)=resver1;
EEMRES2(2,:,:)=resver2;
EEMRES2(3,:,:)=resver3;
EEMRES2(4,:,:)=resver4;
EEMRES2(5,:,:)=resver5;
EEMRES2(6,:,:)=resver6;
EEMRES2(7,:,:)=resref7;
EEMRES2(8,:,:)=resref8;
EEMRES2(9,:,:)=resref9;
EEMRES2(10,:,:)=resref10;
EEMRES2(11,:,:)=resref11;
EEMRES2(12,:,:)=EEMN2(7,1:51,1:33);
EEMRES2(13,:,:)=EEMN2(8,1:51,1:33);
EEMRES2(14,:,:)=EEMN2(10,1:51,1:33);

[ssX,Corco,It] = pftest(14,EEMRES2,7,[],[2 2 2]);


EEMRIO2(1,:,:)=NewEEMLB(23,1:51,1:33);
EEMRIO2(2,:,:)=NewEEMLB(24,1:51,1:33);
EEMRIO2(3,:,:)=NewEEMLB(25,1:51,1:33);
EEMRIO2(4,:,:)=NewEEMLB(26,1:51,1:33);
EEMRIO2(5,:,:)=NewEEMLB(27,1:51,1:33);
EEMRIO2(6,:,:)=NewEEMLB(28,1:51,1:33);
EEMRIO2(7,:,:)=NewEEMLB(35,1:51,1:33);
EEMRIO2(8,:,:)=NewEEMLB(36,1:51,1:33);
EEMRIO2(9,:,:)=NewEEMLB(37,1:51,1:33);
EEMRIO2(10,:,:)=NewEEMLB(38,1:51,1:33);
EEMRIO2(11,:,:)=NewEEMLB(39,1:51,1:33);
EEMRIO2(12,:,:)=NewEEMLB(1,1:51,1:33);
EEMRIO2(13,:,:)=NewEEMLB(2,1:51,1:33);
EEMRIO2(14,:,:)=NewEEMLB(3,1:51,1:33);
EEMRIO2(15,:,:)=NewEEMLB(4,1:51,1:33);
EEMRIO2(16,:,:)=NewEEMLB(5,1:51,1:33);
EEMRIO2(17,:,:)=NewEEMLB(6,1:51,1:33);
EEMRIO2(18,:,:)=NewEEMLB(7,1:51,1:33);
EEMRIO2(19,:,:)=NewEEMLB(8,1:51,1:33);
EEMRIO2(20,:,:)=NewEEMLB(9,1:51,1:33);
EEMRIO2(21,:,:)=NewEEMLB(10,1:51,1:33);
EEMRIO2(22,:,:)=NewEEMLB(11,1:51,1:33);
EEMRIO2(23,:,:)=NewEEMLB(12,1:51,1:33);
EEMRIO2(24,:,:)=NewEEMLB(13,1:51,1:33);

[ssX,Corco,It] = pftest(24,EEMRIO2,7,[],[2 2 2]);

EEMRIO3(1,:,:)=NewEEMLB(23,:,:);
EEMRIO3(2,:,:)=NewEEMLB(24,:,:);
EEMRIO3(3,:,:)=NewEEMLB(25,:,:);
EEMRIO3(4,:,:)=NewEEMLB(26,:,:);
EEMRIO3(5,:,:)=NewEEMLB(27,:,:);
EEMRIO3(6,:,:)=NewEEMLB(28,:,:);
EEMRIO3(7,:,:)=NewEEMLB(35,:,:);
EEMRIO3(8,:,:)=NewEEMLB(36,:,:);
EEMRIO3(9,:,:)=NewEEMLB(37,:,:);
EEMRIO3(10,:,:)=NewEEMLB(38,:,:);
EEMRIO3(11,:,:)=NewEEMLB(39,:,:);
EEMRIO3(12,:,:)=NewEEMLB(1,:,:);
EEMRIO3(13,:,:)=NewEEMLB(2,:,:);
EEMRIO3(14,:,:)=NewEEMLB(3,:,:);
EEMRIO3(15,:,:)=NewEEMLB(4,:,:);
EEMRIO3(16,:,:)=NewEEMLB(5,:,:);
EEMRIO3(17,:,:)=NewEEMLB(6,:,:);
EEMRIO3(18,:,:)=NewEEMLB(7,:,:);
EEMRIO3(19,:,:)=NewEEMLB(8,:,:);
EEMRIO3(20,:,:)=NewEEMLB(9,:,:);
EEMRIO3(21,:,:)=NewEEMLB(10,:,:);
EEMRIO3(22,:,:)=NewEEMLB(11,:,:);
EEMRIO3(23,:,:)=NewEEMLB(12,:,:);
EEMRIO3(24,:,:)=NewEEMLB(13,:,:);
EEMRIO3(25,:,:)=EEMP(1,:,:);
EEMRIO3(26,:,:)=EEMP(2,:,:);
EEMRIO3(27,:,:)=EEMP(3,:,:);
EEMRIO3(28,:,:)=EEMP(4,:,:);

[ssX,Corco,It] = pftest(28,EEMRIO3,7,[],[2 2 2]);

EEMRIO4(1,:,:)=NewEEMLB(23,1:51,1:33);
EEMRIO4(2,:,:)=NewEEMLB(24,1:51,1:33);
EEMRIO4(3,:,:)=NewEEMLB(25,1:51,1:33);
EEMRIO4(4,:,:)=NewEEMLB(26,1:51,1:33);
EEMRIO4(5,:,:)=NewEEMLB(27,1:51,1:33);
EEMRIO4(6,:,:)=NewEEMLB(28,1:51,1:33);
EEMRIO4(7,:,:)=NewEEMLB(35,1:51,1:33);
EEMRIO4(8,:,:)=NewEEMLB(36,1:51,1:33);
EEMRIO4(9,:,:)=NewEEMLB(37,1:51,1:33);
EEMRIO4(10,:,:)=NewEEMLB(38,1:51,1:33);
EEMRIO4(11,:,:)=NewEEMLB(39,1:51,1:33);
EEMRIO4(12,:,:)=NewEEMLB(1,1:51,1:33);
EEMRIO4(13,:,:)=NewEEMLB(2,1:51,1:33);
EEMRIO4(14,:,:)=NewEEMLB(3,1:51,1:33);
EEMRIO4(15,:,:)=NewEEMLB(4,1:51,1:33);
EEMRIO4(16,:,:)=NewEEMLB(5,1:51,1:33);
EEMRIO4(17,:,:)=NewEEMLB(6,1:51,1:33);
EEMRIO4(18,:,:)=NewEEMLB(7,1:51,1:33);
EEMRIO4(19,:,:)=NewEEMLB(8,1:51,1:33);
EEMRIO4(20,:,:)=NewEEMLB(9,1:51,1:33);
EEMRIO4(21,:,:)=NewEEMLB(10,1:51,1:33);
EEMRIO4(22,:,:)=NewEEMLB(11,1:51,1:33);
EEMRIO4(23,:,:)=NewEEMLB(12,1:51,1:33);
EEMRIO4(24,:,:)=NewEEMLB(13,1:51,1:33);
EEMRIO4(25,:,:)=EEMPH(1,1:51,1:33);
EEMRIO4(26,:,:)=EEMPH(2,1:51,1:33);
EEMRIO4(27,:,:)=EEMPH(3,1:51,1:33);
EEMRIO4(28,:,:)=EEMPH(4,1:51,1:33);

[ssX,Corco,It] = pftest(28,EEMRIO4,7,[],[2 2 2]);

EEMRIO5(1,:,:)=NewEEMLB(23,1:51,1:33);
EEMRIO5(2,:,:)=NewEEMLB(24,1:51,1:33);
EEMRIO5(3,:,:)=NewEEMLB(25,1:51,1:33);
EEMRIO5(4,:,:)=NewEEMLB(26,1:51,1:33);
EEMRIO5(5,:,:)=NewEEMLB(27,1:51,1:33);
EEMRIO5(6,:,:)=NewEEMLB(28,1:51,1:33);
EEMRIO5(7,:,:)=NewEEMLB(35,1:51,1:33);
EEMRIO5(8,:,:)=NewEEMLB(36,1:51,1:33);
EEMRIO5(9,:,:)=NewEEMLB(37,1:51,1:33);
EEMRIO5(10,:,:)=NewEEMLB(38,1:51,1:33);
EEMRIO5(11,:,:)=NewEEMLB(39,1:51,1:33);
EEMRIO5(12,:,:)=NewEEMLB(1,1:51,1:33);
EEMRIO5(13,:,:)=NewEEMLB(2,1:51,1:33);
EEMRIO5(14,:,:)=NewEEMLB(3,1:51,1:33);
EEMRIO5(15,:,:)=NewEEMLB(4,1:51,1:33);
EEMRIO5(16,:,:)=NewEEMLB(5,1:51,1:33);
EEMRIO5(17,:,:)=NewEEMLB(6,1:51,1:33);
EEMRIO5(18,:,:)=NewEEMLB(7,1:51,1:33);
EEMRIO5(19,:,:)=NewEEMLB(8,1:51,1:33);
EEMRIO5(20,:,:)=NewEEMLB(9,1:51,1:33);
EEMRIO5(21,:,:)=NewEEMLB(10,1:51,1:33);
EEMRIO5(22,:,:)=NewEEMLB(11,1:51,1:33);
EEMRIO5(23,:,:)=NewEEMLB(12,1:51,1:33);
EEMRIO5(24,:,:)=NewEEMLB(13,1:51,1:33);
EEMRIO5(25,:,:)=EEMN2(1,1:51,1:33);
EEMRIO5(26,:,:)=EEMN2(2,1:51,1:33);
EEMRIO5(27,:,:)=EEMN2(3,1:51,1:33);
EEMRIO5(28,:,:)=EEMN2(4,1:51,1:33);
EEMRIO5(29,:,:)=EEMN2(5,1:51,1:33);
EEMRIO5(30,:,:)=EEMN2(6,1:51,1:33);
EEMRIO5(31,:,:)=EEMN2(7,1:51,1:33);
EEMRIO5(32,:,:)=EEMN2(8,1:51,1:33);
EEMRIO5(33,:,:)=EEMN2(10,1:51,1:33);

[ssX,Corco,It] = pftest(33,EEMRIO5,7,[],[2 2 2]);

%%%%% rio con pireno y naftaleno 1-OH
EEMRIOPN(1,:,:)=NewEEMLB(23,1:51,1:33);
EEMRIOPN(2,:,:)=NewEEMLB(24,1:51,1:33);
EEMRIOPN(3,:,:)=NewEEMLB(25,1:51,1:33);
EEMRIOPN(4,:,:)=NewEEMLB(26,1:51,1:33);
EEMRIOPN(5,:,:)=NewEEMLB(27,1:51,1:33);
EEMRIOPN(6,:,:)=NewEEMLB(28,1:51,1:33);
EEMRIOPN(7,:,:)=NewEEMLB(35,1:51,1:33);
EEMRIOPN(8,:,:)=NewEEMLB(36,1:51,1:33);
EEMRIOPN(9,:,:)=NewEEMLB(37,1:51,1:33);
EEMRIOPN(10,:,:)=NewEEMLB(38,1:51,1:33);
EEMRIOPN(11,:,:)=NewEEMLB(39,1:51,1:33);
EEMRIOPN(12,:,:)=NewEEMLB(1,1:51,1:33);
EEMRIOPN(13,:,:)=NewEEMLB(2,1:51,1:33);
EEMRIOPN(14,:,:)=NewEEMLB(3,1:51,1:33);
EEMRIOPN(15,:,:)=NewEEMLB(4,1:51,1:33);
EEMRIOPN(16,:,:)=NewEEMLB(5,1:51,1:33);
EEMRIOPN(17,:,:)=NewEEMLB(6,1:51,1:33);
EEMRIOPN(18,:,:)=NewEEMLB(7,1:51,1:33);
EEMRIOPN(19,:,:)=NewEEMLB(8,1:51,1:33);
EEMRIOPN(20,:,:)=NewEEMLB(9,1:51,1:33);
EEMRIOPN(21,:,:)=NewEEMLB(10,1:51,1:33);
EEMRIOPN(22,:,:)=NewEEMLB(11,1:51,1:33);
EEMRIOPN(23,:,:)=NewEEMLB(12,1:51,1:33);
EEMRIOPN(24,:,:)=NewEEMLB(13,1:51,1:33);
EEMRIOPN(25,:,:)=EEMN2(6,1:51,1:33);
EEMRIOPN(26,:,:)=EEMN2(7,1:51,1:33);
EEMRIOPN(27,:,:)=EEMN2(8,1:51,1:33);
EEMRIOPN(28,:,:)=EEMN2(10,1:51,1:33);
EEMRIOPN(29,:,:)=EEMP(1,1:51,1:33);
EEMRIOPN(30,:,:)=EEMP(2,1:51,1:33);
EEMRIOPN(31,:,:)=EEMP(3,1:51,1:33);
EEMRIOPN(32,:,:)=EEMP(4,1:51,1:33);

[ssX,Corco,It] = pftest(32,EEMRIOPN,7,[],[2 2 2]);

[ssX,Corco,It] = pftest(32,EEMRIOPN2(1:9,:,:),7,[],[2 2 2]);

%%%%% rio reducida en una 
EEMRIOPN2(1,:,:)=NewEEMLB(24,1:51,1:33);
EEMRIOPN2(2,:,:)=NewEEMLB(25,1:51,1:33);
EEMRIOPN2(3,:,:)=NewEEMLB(26,1:51,1:33);
EEMRIOPN2(4,:,:)=NewEEMLB(27,1:51,1:33);
EEMRIOPN2(5,:,:)=NewEEMLB(28,1:51,1:33);
EEMRIOPN2(6,:,:)=NewEEMLB(36,1:51,1:33);
EEMRIOPN2(7,:,:)=NewEEMLB(37,1:51,1:33);
EEMRIOPN2(8,:,:)=NewEEMLB(38,1:51,1:33);
EEMRIOPN2(9,:,:)=NewEEMLB(39,1:51,1:33);
EEMRIOPN2(10,:,:)=NewEEMLB(1,1:51,1:33);
EEMRIOPN2(11,:,:)=NewEEMLB(2,1:51,1:33);
EEMRIOPN2(12,:,:)=NewEEMLB(3,1:51,1:33);
EEMRIOPN2(13,:,:)=NewEEMLB(4,1:51,1:33);
EEMRIOPN2(14,:,:)=NewEEMLB(5,1:51,1:33);
EEMRIOPN2(15,:,:)=NewEEMLB(6,1:51,1:33);
EEMRIOPN2(16,:,:)=NewEEMLB(7,1:51,1:33);
EEMRIOPN2(17,:,:)=NewEEMLB(8,1:51,1:33);
EEMRIOPN2(18,:,:)=NewEEMLB(9,1:51,1:33);
EEMRIOPN2(19,:,:)=NewEEMLB(10,1:51,1:33);
EEMRIOPN2(20,:,:)=NewEEMLB(11,1:51,1:33);
EEMRIOPN2(21,:,:)=NewEEMLB(12,1:51,1:33);
EEMRIOPN2(22,:,:)=NewEEMLB(13,1:51,1:33);
EEMRIOPN2(23,:,:)=EEMN2(6,1:51,1:33);
EEMRIOPN2(24,:,:)=EEMN2(7,1:51,1:33);
EEMRIOPN2(25,:,:)=EEMN2(8,1:51,1:33);
EEMRIOPN2(26,:,:)=EEMN2(10,1:51,1:33);
EEMRIOPN2(27,:,:)=EEMP(1,1:51,1:33);
EEMRIOPN2(28,:,:)=EEMP(2,1:51,1:33);
EEMRIOPN2(29,:,:)=EEMP(3,1:51,1:33);
EEMRIOPN2(30,:,:)=EEMP(4,1:51,1:33);

[ssX,Corco,It] = pftest(30,EEMRIOPN2,7,[],[2 2 2]);

%%%%cachama phenathrene
X(1,:,:)=(etoh50);
X(2,:,:)=(CAPHE100);
X(3,:,:)=(CAPHE200);
X(4,:,:)=(CAPHE400);
X(5,:,:)=(CAPHE800);
X(6,:,:)=(CAPHE1600);
X(7,:,:)=(CAPHE3200);
X(8,:,:)=(CAPHE2100);
X(9,:,:)=(CAPHE2200);
X(10,:,:)=(CAPHE2400);
X(11,:,:)=(CAPHE2800);
X(12,:,:)=(CAPHE21600);
X(13,:,:)=(CAPHE23200);

Xin.X = X;
Xin.Em = em;
Xin.Ex = ex;

EEMcor=smootheem(Xin,[10 10],[],[15 15],[],[],[],0.5);

EEMCAP(1,:,:)=EEMcor.X(2,:,:)-EEMcor.X(1,:,:);
EEMCAP(2,:,:)=EEMcor.X(3,:,:)-EEMcor.X(1,:,:);
EEMCAP(3,:,:)=EEMcor.X(4,:,:)-EEMcor.X(1,:,:);
EEMCAP(4,:,:)=EEMcor.X(5,:,:)-EEMcor.X(1,:,:);
EEMCAP(5,:,:)=EEMcor.X(6,:,:)-EEMcor.X(1,:,:);
EEMCAP(6,:,:)=EEMcor.X(7,:,:)-EEMcor.X(1,:,:);
EEMCAP(7,:,:)=EEMcor.X(8,:,:)-EEMcor.X(1,:,:);
EEMCAP(8,:,:)=EEMcor.X(9,:,:)-EEMcor.X(1,:,:);
EEMCAP(9,:,:)=EEMcor.X(10,:,:)-EEMcor.X(1,:,:);
EEMCAP(10,:,:)=EEMcor.X(11,:,:)-EEMcor.X(1,:,:);
EEMCAP(11,:,:)=EEMcor.X(12,:,:)-EEMcor.X(1,:,:);
EEMCAP(12,:,:)=EEMcor.X(13,:,:)-EEMcor.X(1,:,:);

[ssX,Corco,It] = pftest(12,EEMCAP,7,[],[2 2 2]);

EEMPHEC(1,:,:)=NewEEMA(43,1:61,:);
EEMPHEC(2,:,:)=NewEEMA(44,1:61,:);
EEMPHEC(3,:,:)=NewEEMA(45,1:61,:);
EEMPHEC(4,:,:)=NewEEMA(46,1:61,:);
EEMPHEC(5,:,:)=NewEEMA(47,1:61,:);
EEMPHEC(6,:,:)=NewEEMA(48,1:61,:);
EEMPHEC(7,:,:)=NewEEMA(49,1:61,:);
EEMPHEC(8,:,:)=NewEEMA(50,1:61,:);
EEMRIO(29,:,:)=NewEEMLB(1,1:51,1:33);
EEMRIO(30,:,:)=NewEEMLB(2,1:51,1:33);
EEMRIO(31,:,:)=NewEEMLB(3,1:51,1:33);
EEMRIO(32,:,:)=NewEEMLB(4,1:51,1:33);
EEMRIO(33,:,:)=NewEEMLB(5,1:51,1:33);
EEMRIO(34,:,:)=NewEEMLB(6,1:51,1:33);
EEMRIO(35,:,:)=NewEEMLB(7,1:51,1:33);
EEMRIO(36,:,:)=NewEEMLB(8,1:51,1:33);
EEMRIO(37,:,:)=NewEEMLB(9,1:51,1:33);
EEMRIO(38,:,:)=NewEEMLB(10,1:51,1:33);
EEMRIO(39,:,:)=NewEEMLB(11,1:51,1:33);
EEMRIO(40,:,:)=NewEEMLB(12,1:51,1:33);
EEMRIO(41,:,:)=NewEEMLB(13,1:51,1:33);
EEMPHEC(9,:,:)=EEMPH(1,:,:);
EEMPHEC(10,:,:)=EEMPH(2,:,:);
EEMPHEC(11,:,:)=EEMPH(3,:,:);
EEMPHEC(12,:,:)=EEMPH(4,:,:);
EEMPHEC(13,:,:)=EEMCAP(1,1:61,:);
EEMPHEC(14,:,:)=EEMCAP(2,1:61,:);
EEMPHEC(15,:,:)=EEMCAP(3,1:61,:);
EEMPHEC(16,:,:)=EEMCAP(4,1:61,:);
EEMPHEC(17,:,:)=EEMCAP(5,1:61,:);
EEMPHEC(18,:,:)=EEMCAP(6,1:61,:);
EEMPHEC(19,:,:)=EEMCAP(7,1:61,:);
EEMPHEC(20,:,:)=EEMCAP(8,1:61,:);
EEMPHEC(21,:,:)=EEMCAP(9,1:61,:);
EEMPHEC(22,:,:)=EEMCAP(10,1:61,:);
EEMPHEC(23,:,:)=EEMCAP(11,1:61,:);
EEMPHEC(24,:,:)=EEMCAP(12,1:61,:);

[ssX,Corco,It] = pftest(16,EEMPHEC(9:24,:,:),5,[],[2 2 2]);%%%EXPUESTA A PHENANTHRENE con metabolitos 

[ssX,Corco,It] = pftest(24,EEMPHEC,5,[],[2 2 2]);%%%%CON lUMINOSA EXPUESTA A PHE

%%%%%%%%%Bilis de cachama y luminosa expuesta a fenantreno y naftaleno
EEMPHET(1,:,:)=NewEEMA(43,1:51,1:33);
EEMPHET(2,:,:)=NewEEMA(44,1:51,1:33);
EEMPHET(3,:,:)=NewEEMA(45,1:51,1:33);
EEMPHET(4,:,:)=NewEEMA(46,1:51,1:33);
EEMPHET(5,:,:)=NewEEMA(47,1:51,1:33);
EEMPHET(6,:,:)=NewEEMA(48,1:51,1:33);
EEMPHET(7,:,:)=NewEEMA(49,1:51,1:33);
EEMPHET(8,:,:)=NewEEMA(50,1:51,1:33);
EEMPHET(9,:,:)=NewEEMLB(1,1:51,1:33);
EEMPHET(10,:,:)=NewEEMLB(2,1:51,1:33);
EEMPHET(11,:,:)=NewEEMLB(3,1:51,1:33);
EEMPHET(12,:,:)=NewEEMLB(4,1:51,1:33);
EEMPHET(13,:,:)=NewEEMLB(5,1:51,1:33);
EEMPHET(14,:,:)=NewEEMLB(6,1:51,1:33);
EEMPHET(15,:,:)=NewEEMLB(7,1:51,1:33);
EEMPHET(16,:,:)=NewEEMLB(8,1:51,1:33);
EEMPHET(17,:,:)=NewEEMLB(9,1:51,1:33);
EEMPHET(18,:,:)=NewEEMLB(10,1:51,1:33);
EEMPHET(19,:,:)=NewEEMLB(11,1:51,1:33);
EEMPHET(20,:,:)=NewEEMLB(12,1:51,1:33);
EEMPHET(21,:,:)=NewEEMLB(13,1:51,1:33);
EEMPHET(22,:,:)=EEMPH(1,1:51,1:33);
EEMPHET(23,:,:)=EEMPH(2,1:51,1:33);
EEMPHET(24,:,:)=EEMPH(3,1:51,1:33);
EEMPHET(25,:,:)=EEMPH(4,1:51,1:33);
EEMPHET(26,:,:)=EEMN2(1,1:51,1:33);
EEMPHET(27,:,:)=EEMN2(2,1:51,1:33);
EEMPHET(28,:,:)=EEMN2(3,1:51,1:33);
EEMPHET(29,:,:)=EEMN2(4,1:51,1:33);
EEMPHET(30,:,:)=EEMN2(5,1:51,1:33);
EEMPHET(31,:,:)=EEMN2(6,1:51,1:33);
EEMPHET(32,:,:)=EEMN2(7,1:51,1:33);
EEMPHET(33,:,:)=EEMN2(8,1:51,1:33);
EEMPHET(34,:,:)=EEMN2(10,1:51,1:33);
EEMPHET(35,:,:)=EEMCAP(1,1:51,1:33);
EEMPHET(36,:,:)=EEMCAP(2,1:51,1:33);
EEMPHET(37,:,:)=EEMCAP(3,1:51,1:33);
EEMPHET(38,:,:)=EEMCAP(4,1:51,1:33);
EEMPHET(39,:,:)=EEMCAP(5,1:51,1:33);
EEMPHET(40,:,:)=EEMCAP(6,1:51,1:33);
EEMPHET(41,:,:)=EEMCAP(7,1:51,1:33);
EEMPHET(42,:,:)=EEMCAP(8,1:51,1:33);
EEMPHET(43,:,:)=EEMCAP(9,1:51,1:33);
EEMPHET(44,:,:)=EEMCAP(10,1:51,1:33);
EEMPHET(45,:,:)=EEMCAP(11,1:51,1:33);
EEMPHET(46,:,:)=EEMCAP(12,1:51,1:33);
EEMPHET(47,:,:)=NewEEMLB(14,1:51,1:33);
EEMPHET(48,:,:)=NewEEMLB(15,1:51,1:33);
EEMPHET(49,:,:)=NewEEMLB(16,1:51,1:33);
EEMPHET(50,:,:)=NewEEMLB(17,1:51,1:33);
EEMPHET(51,:,:)=NewEEMLB(18,1:51,1:33);
EEMPHET(52,:,:)=NewEEMLB(19,1:51,1:33);
EEMPHET(53,:,:)=NewEEMLB(20,1:51,1:33);
EEMPHET(54,:,:)=NewEEMLB(21,1:51,1:33);
EEMPHET(55,:,:)=NewEEMLB(21,1:51,1:33);

[ssX,Corco,It] = pftest(55,EEMPHET,7,[],[2 2 2]);

%%%%%%%%%%%bilis lumino y cachama con fenantreno
EEMPHETO(1,:,:)=NewEEMA(43,1:61,1:43);
EEMPHETO(2,:,:)=NewEEMA(44,1:61,1:43);
EEMPHETO(3,:,:)=NewEEMA(45,1:61,1:43);
EEMPHETO(4,:,:)=NewEEMA(46,1:61,1:43);
EEMPHETO(5,:,:)=NewEEMA(47,1:61,1:43);
EEMPHETO(6,:,:)=NewEEMA(48,1:61,1:43);
EEMPHETO(7,:,:)=NewEEMA(49,1:61,1:43);
EEMPHETO(8,:,:)=NewEEMA(50,1:61,1:43);
EEMPHETO(9,:,:)=NewEEMLB(1,1:61,1:43);
EEMPHETO(10,:,:)=NewEEMLB(2,1:61,1:43);
EEMPHETO(11,:,:)=NewEEMLB(3,1:61,1:43);
EEMPHETO(12,:,:)=NewEEMLB(4,1:61,1:43);
EEMPHETO(13,:,:)=NewEEMLB(5,1:61,1:43);
EEMPHETO(14,:,:)=NewEEMLB(6,1:61,1:43);
EEMPHETO(15,:,:)=NewEEMLB(7,1:61,1:43);
EEMPHETO(16,:,:)=NewEEMLB(8,1:61,1:43);
EEMPHETO(17,:,:)=NewEEMLB(9,1:61,1:43);
EEMPHETO(18,:,:)=NewEEMLB(10,1:61,1:43);
EEMPHETO(19,:,:)=NewEEMLB(11,1:61,1:43);
EEMPHETO(20,:,:)=NewEEMLB(12,1:61,1:43);
EEMPHETO(21,:,:)=NewEEMLB(13,1:61,1:43);
EEMPHETO(22,:,:)=EEMPH(1,1:61,1:43);
EEMPHETO(23,:,:)=EEMPH(2,1:61,1:43);
EEMPHETO(24,:,:)=EEMPH(3,1:61,1:43);
EEMPHETO(25,:,:)=EEMPH(4,1:61,1:43);
EEMPHETO(26,:,:)=EEMCAP(1,1:61,1:43);
EEMPHETO(27,:,:)=EEMCAP(2,1:61,1:43);
EEMPHETO(28,:,:)=EEMCAP(3,1:61,1:43);
EEMPHETO(29,:,:)=EEMCAP(4,1:61,1:43);
EEMPHETO(30,:,:)=EEMCAP(5,1:61,1:43);
EEMPHETO(31,:,:)=EEMCAP(6,1:61,1:43);
EEMPHETO(32,:,:)=EEMCAP(7,1:61,1:43);
EEMPHETO(33,:,:)=EEMCAP(8,1:61,1:43);
EEMPHETO(34,:,:)=EEMCAP(9,1:61,1:43);
EEMPHETO(35,:,:)=EEMCAP(10,1:61,1:43);
EEMPHETO(36,:,:)=EEMCAP(11,1:61,1:43);
EEMPHETO(37,:,:)=EEMCAP(12,1:61,1:43);
EEMPHETO(38,:,:)=NewEEMLB(14,1:61,1:43);
EEMPHETO(39,:,:)=NewEEMLB(15,1:61,1:43);
EEMPHETO(40,:,:)=NewEEMLB(16,1:61,1:43);
EEMPHETO(41,:,:)=NewEEMLB(17,1:61,1:43);
EEMPHETO(42,:,:)=NewEEMLB(18,1:61,1:43);
EEMPHETO(43,:,:)=NewEEMLB(19,1:61,1:43);
EEMPHETO(44,:,:)=NewEEMLB(20,1:61,1:43);
EEMPHETO(45,:,:)=NewEEMLB(21,1:61,1:43);
EEMPHETO(46,:,:)=NewEEMLB(22,1:61,1:43);

[ssX,Corco,It] = pftest(46,EEMPHETO,7,[],[2 2 2]);

PARAPHE=parafac(EEMPHETO,4,[],[2 2 2]);
[Aphe,Bphe,Cphe] = fac2let (PARAPHE);
subplot(2,2,1); plot(Aphe)
xlabel('Sample')
ylabel('Score')
subplot(2,2,2); plot(em(1:61,:),Bphe)
xlabel('Emision(nm)')
ylabel('Fluorescence')
subplot(2,2,3); plot(ex,Cphe)
xlabel('Excitation(nm)')
ylabel('Fluorescence')

ohphe=(((Bphe(:,1)*Cphe(:,1)')).*Aphe(5,1))+(((Bphe(:,3)*Cphe(:,3)')).*Aphe(5,3));
ohphe2=(((Bphe(:,1)*Cphe(:,1)')).*Aphe(26,1))+(((Bphe(:,3)*Cphe(:,3)')).*Aphe(26,3));
subplot(2,2,4); mesh (ex,em(1:61,:),ohphe)
xlabel('Excitation')
ylabel('Emision')
zlabel('Fluorescence')

%%%%%%%%%%%bilis lumino y cachama con fenantreno CON -5NM
EEMPHETOA(1,:,:)=NewEEMA(43,1:60,1:43);
EEMPHETOA(2,:,:)=NewEEMA(44,1:60,1:43);
EEMPHETOA(3,:,:)=NewEEMA(45,1:60,1:43);
EEMPHETOA(4,:,:)=NewEEMA(46,1:60,1:43);
EEMPHETOA(5,:,:)=NewEEMA(47,1:60,1:43);
EEMPHETOA(6,:,:)=NewEEMA(48,1:60,1:43);
EEMPHETOA(7,:,:)=NewEEMA(49,1:60,1:43);
EEMPHETOA(8,:,:)=NewEEMA(50,1:60,1:43);
EEMPHETOA(9,:,:)=NewEEMLB(1,1:60,1:43);
EEMPHETOA(10,:,:)=NewEEMLB(2,1:60,1:43);
EEMPHETOA(11,:,:)=NewEEMLB(3,1:60,1:43);
EEMPHETOA(12,:,:)=NewEEMLB(4,1:60,1:43);
EEMPHETOA(13,:,:)=NewEEMLB(5,1:60,1:43);
EEMPHETOA(14,:,:)=NewEEMLB(6,1:60,1:43);
EEMPHETOA(15,:,:)=NewEEMLB(7,1:60,1:43);
EEMPHETOA(16,:,:)=NewEEMLB(8,1:60,1:43);
EEMPHETOA(17,:,:)=NewEEMLB(9,1:60,1:43);
EEMPHETOA(18,:,:)=NewEEMLB(10,1:60,1:43);
EEMPHETOA(19,:,:)=NewEEMLB(11,1:60,1:43);
EEMPHETOA(20,:,:)=NewEEMLB(12,1:60,1:43);
EEMPHETOA(21,:,:)=NewEEMLB(13,1:60,1:43);
EEMPHETOA(22,:,:)=EEMPH(1,2:61,1:43);
EEMPHETOA(23,:,:)=EEMPH(2,2:61,1:43);
EEMPHETOA(24,:,:)=EEMPH(3,2:61,1:43);
EEMPHETOA(25,:,:)=EEMPH(4,2:61,1:43);
EEMPHETOA(26,:,:)=EEMCAP(1,1:60,1:43);
EEMPHETOA(27,:,:)=EEMCAP(2,1:60,1:43);
EEMPHETOA(28,:,:)=EEMCAP(3,1:60,1:43);
EEMPHETOA(29,:,:)=EEMCAP(4,1:60,1:43);
EEMPHETOA(30,:,:)=EEMCAP(5,1:60,1:43);
EEMPHETOA(31,:,:)=EEMCAP(6,1:60,1:43);
EEMPHETOA(32,:,:)=EEMCAP(7,1:60,1:43);
EEMPHETOA(33,:,:)=EEMCAP(8,1:60,1:43);
EEMPHETOA(34,:,:)=EEMCAP(9,1:60,1:43);
EEMPHETOA(35,:,:)=EEMCAP(10,1:60,1:43);
EEMPHETOA(36,:,:)=EEMCAP(11,1:60,1:43);
EEMPHETOA(37,:,:)=EEMCAP(12,1:60,1:43);
EEMPHETOA(38,:,:)=NewEEMLB(14,1:60,1:43);
EEMPHETOA(39,:,:)=NewEEMLB(15,1:60,1:43);
EEMPHETOA(40,:,:)=NewEEMLB(16,1:60,1:43);
EEMPHETOA(41,:,:)=NewEEMLB(17,1:60,1:43);
EEMPHETOA(42,:,:)=NewEEMLB(18,1:60,1:43);
EEMPHETOA(43,:,:)=NewEEMLB(19,1:60,1:43);
EEMPHETOA(44,:,:)=NewEEMLB(20,1:60,1:43);
EEMPHETOA(45,:,:)=NewEEMLB(21,1:60,1:43);
EEMPHETOA(46,:,:)=NewEEMLB(22,1:60,1:43);

[ssX,Corco,It] = pftest(46,EEMPHETOA,7,[],[2 2 2]);

PARAPHEA=parafac(EEMPHETOA,4,[],[2 2 2]);
[Aphea,Bphea,Cphea] = fac2let (PARAPHEA);
subplot(2,3,1); plot(Aphea)
xlabel('Sample')
ylabel('Score')
subplot(2,3,2); plot(em(1:60,:),Bphea)
xlabel('Emision(nm)')
ylabel('Fluorescence')
subplot(2,3,3); plot(ex,Cphea)
xlabel('Excitation(nm)')
ylabel('Fluorescence')

ohphea=(((Bphea(:,1)*Cphea(:,1)')).*Aphea(1,1));
ohphea2=(((Bphea(:,3)*Cphea(:,3)')).*Aphea(1,1));
ohphea3=(((Bphea(:,3)*Cphea(:,3)')).*Aphea(1,1))+(((Bphea(:,1)*Cphea(:,1)')).*Aphea(1,1));
subplot(2,3,4); mesh (ex,em(1:60,:),ohphea)
xlabel('Excitation')
ylabel('Emision')
zlabel('Fluorescence')
subplot(2,3,5); mesh (ex,em(1:60,:),ohphea2)
xlabel('Excitation')
ylabel('Emision')
zlabel('Fluorescence')
subplot(2,3,6); mesh(ex,em,(squeeze(EEMPH(2,1:61,1:43))));

PARAPHEA3=parafac(EEMPHETOA,3,[],[2 2 2]);
[Aphea3,Bphea3,Cphea3] = fac2let (PARAPHEA3);
subplot(2,2,1); plot(Aphea3)
xlabel('Sample')
ylabel('Score')
subplot(2,2,2); plot(em(1:60,:),Bphea3)
xlabel('Emision(nm)')
ylabel('Fluorescence')
subplot(2,2,3); plot(ex,Cphea3)
xlabel('Excitation(nm)')
ylabel('Fluorescence')

ohphea33=(((Bphea3(:,1)*Cphea3(:,1)')).*Aphea3(1,1));
subplot(2,2,4); mesh (ex,em(1:60,:),ohphea33)
xlabel('Excitation')
ylabel('Emision')
zlabel('Fluorescence')

